Fix for IE Bug that caused stack overflow at line 0 when loading Objective-J every time.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2010-02-17 13:39:15 -08:00
1 parent df895b9529
commit 4f50f8b83f
2 files changed
+24 -5

No files matched your search

+23 -3
View File
@@ -1,7 +1,27 @@
var ObjectiveJ = { };
var global = { },
ObjectiveJ = { };
(function (global, exports)
(function (global, exports, namespace)
{
var GLOBAL_NAMESPACE = namespace;
#include "Includes.js"
})(window, ObjectiveJ);
})(global, ObjectiveJ, window);
var hasOwnProperty = Object.prototype.hasOwnProperty;
// If we can't trust the host object, don't treat it as global
// and fall back to inferred global through eval. In IE this
// make a difference.
if (window.window !== window)
{
for (key in global)
if (hasOwnProperty.call(global, key))
eval(key + " = global[\"" + key + "\"];");
}
else
{
for (key in global)
if (hasOwnProperty.call(global, key))
window[key] = global[key];
}
+1 -2
View File
@@ -282,8 +282,7 @@ function class_getMethodImplementation(/*Class*/ aClass, /*SEL*/ aSelector)
}
// Adding Classes
var GLOBAL_NAMESPACE = global,
var GLOBAL_NAMESPACE = GLOBAL_NAMESPACE || global,
REGISTERED_CLASSES = { };
function objj_allocateClassPair(/*Class*/ superclass, /*String*/ aName)