Bug 1028421 - Have xpcshell set compile-and-go. r=bz

From 7574b690a54b731b149f5df05dfaf7c229a98f4a Mon Sep 17 00:00:00 2001
This allows scripts to be compiled with Ion.
---
 js/xpconnect/src/XPCShellImpl.cpp |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
This commit is contained in:
Vincent St-Amour 2014-06-17 17:06:19 -07:00
parent 7f60a8d608
commit 31c2bbfeaf

View File

@ -339,7 +339,8 @@ Load(JSContext *cx, unsigned argc, jsval *vp)
}
JS::CompileOptions options(cx);
options.setUTF8(true)
.setFileAndLine(filename.ptr(), 1);
.setFileAndLine(filename.ptr(), 1)
.setCompileAndGo(true);
JS::Rooted<JSScript*> script(cx);
JS::Compile(cx, obj, options, file, &script);
fclose(file);
@ -924,7 +925,8 @@ ProcessFile(JSContext *cx, JS::Handle<JSObject*> obj, const char *filename, FILE
JS::CompileOptions options(cx);
options.setUTF8(true)
.setFileAndLine(filename, 1);
.setFileAndLine(filename, 1)
.setCompileAndGo(true);
if (JS::Compile(cx, obj, options, file, &script) && !compileOnly)
(void)JS_ExecuteScript(cx, obj, script, &result);
DoEndRequest(cx);
@ -959,7 +961,8 @@ ProcessFile(JSContext *cx, JS::Handle<JSObject*> obj, const char *filename, FILE
/* Clear any pending exception from previous failed compiles. */
JS_ClearPendingException(cx);
JS::CompileOptions options(cx);
options.setFileAndLine("typein", startline);
options.setFileAndLine("typein", startline)
.setCompileAndGo(true);
if (JS_CompileScript(cx, obj, buffer, strlen(buffer), options, &script)) {
JSErrorReporter older;