diff --git a/Foundation/CPKeyedUnarchiver.j b/Foundation/CPKeyedUnarchiver.j index 36ec512f8..b828df554 100644 --- a/Foundation/CPKeyedUnarchiver.j +++ b/Foundation/CPKeyedUnarchiver.j @@ -465,7 +465,7 @@ var _CPKeyedUnarchiverDecodeObjectAtIndex = function(self, anIndex) self._plistObject = savedPlistObject; - if (processedObject != object) + if (processedObject !== object) { if (self._delegateSelectors & _CPKeyedUnarchiverWillReplaceObjectWithObjectSelector) [self._delegate unarchiver:self willReplaceObject:object withObject:processedObject]; @@ -519,7 +519,7 @@ var _CPKeyedUnarchiverDecodeObjectAtIndex = function(self, anIndex) // If this object is a member of _CPKeyedArchiverValue, then we know // that it is a wrapper for a primitive JavaScript object. - if (object.isa === _CPKeyedArchiverValueClass) + if (object && (object.isa === _CPKeyedArchiverValueClass)) object = [object JSObject]; return object; diff --git a/Objective-J/Executable.js b/Objective-J/Executable.js index 46aca8158..999b6a9dc 100644 --- a/Objective-J/Executable.js +++ b/Objective-J/Executable.js @@ -280,15 +280,18 @@ function fileExecutableSearchFinished(/*FileExecutable*/ aFileExecutable) function fileExecutableDependencyLoadFinished() { - var index = 0, - count = fileDependencyExecutables.length; + var executables = fileDependencyExecutables, + index = 0, + count = executables.length; + + fileDependencyExecutables = []; for (; index < count; ++index) - fileDependencyExecutables[index]._fileDependencyStatus = ExecutableLoadedFileDependencies; + executables[index]._fileDependencyStatus = ExecutableLoadedFileDependencies; for (index = 0; index < count; ++index) { - var executable = fileDependencyExecutables[index], + var executable = executables[index], callbacks = executable._fileDependencyCallbacks, callbackIndex = 0, callbackCount = callbacks.length;