Bug 899447 - Don't set compileAndGo for scripts evaluated against a non-global object, r=luke.
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 02 Aug 2013 07:43:46 -0600
changeset 153415 e6f86230157da903167f92e11a22d0d8c0f2e59f
parent 153414 8e1fc89b12ca799ff6483c81e36f118db6fbebba
child 153416 e3b5e807075205083351cc02d1d7d742e265bfaf
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs899447
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 899447 - Don't set compileAndGo for scripts evaluated against a non-global object, r=luke.
js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -5164,17 +5164,17 @@ JS::Evaluate(JSContext *cx, HandleObject
     JS_THREADSAFE_ASSERT(cx->compartment() != cx->runtime()->atomsCompartment);
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj);
     JS_ASSERT_IF(options.principals(), cx->compartment()->principals == options.principals());
 
     AutoLastFrameCheck lfc(cx);
 
-    options.setCompileAndGo(true);
+    options.setCompileAndGo(obj->is<GlobalObject>());
     options.setNoScriptRval(!rval);
     SourceCompressionToken sct(cx);
     RootedScript script(cx, frontend::CompileScript(cx, &cx->tempLifoAlloc(),
                                                     obj, NullPtr(), options,
                                                     chars, length, NULL, 0, &sct));
     if (!script)
         return false;