From d735cd98e70e81c9abe73c956cb490bd2c49a78e Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Sat, 30 Jan 2010 00:35:59 -0800 Subject: [PATCH] Fix for FireFox not working. Reviewed by me. --- AppKit/Themes/BlendKit/BKThemeDescriptor.j | 2 +- Objective-J/Executable.js | 4 ++-- Objective-J/Jakefile | 13 +++++++++++-- Objective-J/StaticResourceNode.js | 10 ++++++---- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/AppKit/Themes/BlendKit/BKThemeDescriptor.j b/AppKit/Themes/BlendKit/BKThemeDescriptor.j index cdb4e3984..4c4801ffb 100644 --- a/AppKit/Themes/BlendKit/BKThemeDescriptor.j +++ b/AppKit/Themes/BlendKit/BKThemeDescriptor.j @@ -40,7 +40,7 @@ var ItemSizes = { }, // Grab Theme Descriptor Classes. var themeDescriptorClasses = []; - for (candidate in window) + for (candidate in global) { var theClass = objj_getClass(candidate), theClassName = class_getName(theClass); diff --git a/Objective-J/Executable.js b/Objective-J/Executable.js index 1968061a7..bf0364096 100644 --- a/Objective-J/Executable.js +++ b/Objective-J/Executable.js @@ -73,7 +73,7 @@ Executable.prototype.path = function() Executable.prototype.functionParameters = function() { - var functionParameters = ["objj_executeFile", "objj_importFile"]; + var functionParameters = ["global", "objj_executeFile", "objj_importFile"]; //exportedNames().concat("objj_executeFile", "objj_importFile"); @@ -87,7 +87,7 @@ Executable.prototype.functionParameters = function() Executable.prototype.functionArguments = function() { var path = this.path(), - functionArguments = [fileExecuterForPath(path), fileImporterForPath(path)]; + functionArguments = [global, fileExecuterForPath(path), fileImporterForPath(path)]; //functionArguments = exportedValues().concat(fileExecuterForPath(path), fileImporterForPath(path)); diff --git a/Objective-J/Jakefile b/Objective-J/Jakefile index e57d29828..a396ef80f 100644 --- a/Objective-J/Jakefile +++ b/Objective-J/Jakefile @@ -33,10 +33,19 @@ $BUILD_BROWSER_FILE = FILE.join($BUILD_OBJECTIVE_J, "Objective-J.js"); $INCLUDE_FLAGS = " -I" + FILE.cwd(); filedir($BUILD_BROWSER_FILE, $BROWSER_FILE, function(aTask) -{ +{/* + var methods = ["join", "isAbsolute", "absolute", "basename"], + implementations = { }; + + methods.forEach(function(aMethod) + { + implementations[aMethod] = FILE[aMethod].toString().replace(/exports/, "FILE"); + print(implementations[aMethod]) + }); +*/ gcc($BROWSER_FILE, $BUILD_BROWSER_FILE, - environmentFlags("Browser", "ObjJ") + $INCLUDE_FLAGS, true); + environmentFlags("Browser", "ObjJ") + $INCLUDE_FLAGS, $CONFIGURATION !== "Debug"); }); $LICENSE = FILE.join("CommonJS", "lib", "objective-j", "jake", "LICENSES", "LGPL-v2.1"); diff --git a/Objective-J/StaticResourceNode.js b/Objective-J/StaticResourceNode.js index 28119ed0d..9e35c150c 100644 --- a/Objective-J/StaticResourceNode.js +++ b/Objective-J/StaticResourceNode.js @@ -237,6 +237,11 @@ function resolvePathComponents(/*StaticResourceNode*/ startNode, /*Type*/aType, var count = components.length, parentNode = startNode; + function continueResolution() + { + resolvePathComponents(parentNode, aType, components, index, aCallback); + } + for (; index < count; ++index) { var name = components[index], @@ -245,12 +250,9 @@ function resolvePathComponents(/*StaticResourceNode*/ startNode, /*Type*/aType, //CPLog(name + " of " + parentNode.name() + " " + (childNode && childNode.name())); //CPLog(parentNode._childNodes); // + "(" + components + ")" + " " + index + "/" + count + ":" + (childNode && childNode.name()) +">" + (childNode ? 1:0) + " " + (childNode && childNode.isResolved())); + if (!childNode) { - function continueResolution() - { - resolvePathComponents(parentNode, aType, components, index, aCallback); - } if (index + 1 < count || aType === StaticResourceNode.DirectoryType) {