From 3fc99095e271002b4450a22cb9916c34cdee3bcc Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Sun, 7 Mar 2010 23:48:23 -0800 Subject: [PATCH 1/2] Fix bug in keyed unarchiving. Reviewed by me. --- Foundation/CPKeyedUnarchiver.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; From 33b4b9442605d2c0e2d188e8c452fb7204e9e090 Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Mon, 8 Mar 2010 01:03:52 -0800 Subject: [PATCH 2/2] Fix for loading bundles generating multiple did load callbacks. Reviewed by me. --- Objective-J/Executable.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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;