mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 13:23:07 +00:00
import change from rmottola/Arctic-Fox:
- Bug 1097987 part 1. Change some JS shell function signatures to make it clearer that they are always working with globals, not arbitrary objects. (5f45873a2) - Bug 1097987 part 2. Change JS shell's Run to always compile/execute the script in global scope instead of using its this object. (807880f9e) - Bug 1097987 part 3. Change XPCShellEnvironment to only use JS_ExecuteScript in global scopes. (7cffe2855) - Bug 1097987 part 4. Change mozJSSubScriptLoader to use the scopechain version of JS_ExecuteScript as needed. (3abe5d5c9) - Bug 1097987 part 5. Change XPCShellImpl to use the scopechain version of JS_ExecuteScript as needed. (4642566c3) - Bug 1097987 part 6. Require callers of JS_ExecuteScript to either use the global as the scope or pass in an explicit scopechain. (c4a2a811f) - Bug 1097987 part 7. Require callers of JS::Evaluate to either use the global as the scope or pass in an explicit scopechain. (694c09eb3) - Bug 1143793 part 1. Remove the obj argument of JS_CompileScript. (929d8fd58) - Bug 1143793 part 2. Remove the obj argument of JS_CompileUCScript. (9c577f67c) - Bug 1143793 part 3. Stop passing null as the obj argument of JS::Compile. (86a715f63) - Bug 1143793 part 4. Stop supporting load.call(somerandomobj) in xpcshell. r=bholley (ed2bc21b4) - Bug 1143793 part 5. Release-assert that a script being executed against a non-global scopechain is not compileAndGo. (bcb9ae600) - Bug 1143793 part 6. Drop the obj argument of JS::Compile. This is technically a behavior change for the shell's disfile() function, but I really doubt anyone is doing disfile.call(someObj). (5f99a59bd) - pointer style (c02ff21de) - Bug 1135039: Apply swizzle type policy changes in Ion too (effc49369) - pointer style again (b47813875)
This commit is contained in:
@@ -1603,13 +1603,13 @@ nsMessageManagerScriptExecutor::TryCacheLoadAndCompileScript(
|
||||
JS::Rooted<JSScript*> script(cx);
|
||||
|
||||
if (aRunInGlobalScope) {
|
||||
if (!JS::Compile(cx, JS::NullPtr(), options, srcBuf, &script)) {
|
||||
if (!JS::Compile(cx, options, srcBuf, &script)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// We can't clone compile-and-go scripts.
|
||||
options.setCompileAndGo(false);
|
||||
if (!JS::Compile(cx, JS::NullPtr(), options, srcBuf, &script)) {
|
||||
if (!JS::Compile(cx, options, srcBuf, &script)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user