Check for "system", fixes press.

This commit is contained in:
Tom Robinson
2009-10-08 21:41:35 -07:00
parent 3474e8baf1
commit 69cdc2ccd0
+1 -1
View File
@@ -159,7 +159,7 @@ function fragment_evaluate_code(aFragment)
{
#if RHINO
var functionText = "function(){"+GET_CODE(aFragment)+"/**/\n}";
if (system.engine === "rhino")
if (typeof system !== "undefined" && system.engine === "rhino")
compiled = Packages.org.mozilla.javascript.Context.getCurrentContext().compileFunction(window, functionText, GET_FILE(aFragment).path, 0, null);
else
compiled = eval(functionText);