Details
-
Bug
-
Resolution: Fixed
-
P3
-
8
-
None
-
b94
-
generic
-
generic
-
Verified
Description
loadWithNewGlobal runs given script in a new 'global' instance. The return result could be a script object -- such an object should be properly wrapped. If not, it will start referring/using objects from caller's "world".
Example:
var glob = loadWithNewGlobal(
{ name: "<code>",
script: "function func() { return [] }; this;"
})
// should print false - not an Array of caller's global
print(glob.func() instanceof Array)
// should print false - not an Object from caller's global
print(glob instanceof Object)
Example:
var glob = loadWithNewGlobal(
{ name: "<code>",
script: "function func() { return [] }; this;"
})
// should print false - not an Array of caller's global
print(glob.func() instanceof Array)
// should print false - not an Object from caller's global
print(glob instanceof Object)