Bug 934799 - Part 2: Disable lazy parsing for JSD. (r=sfink, a=lsblakk)
authorShu-yu Guo <shu@rfrn.org>
Wed, 27 Nov 2013 09:54:47 -0800
changeset 167633 69910444a8d540393e62cc9b3cd86aa680099288
parent 167632 7245e4b8d5da134486d1620b1ce84287f102ab85
child 167634 9bc4a9b4064ffb0ce07aaec82fb2ce997af67687
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink, lsblakk
bugs934799
milestone27.0a2
Bug 934799 - Part 2: Disable lazy parsing for JSD. (r=sfink, a=lsblakk)
js/src/frontend/BytecodeCompiler.cpp
--- a/js/src/frontend/BytecodeCompiler.cpp
+++ b/js/src/frontend/BytecodeCompiler.cpp
@@ -136,17 +136,19 @@ MaybeCheckEvalFreeVariables(ExclusiveCon
     return true;
 }
 
 static inline bool
 CanLazilyParse(ExclusiveContext *cx, const CompileOptions &options)
 {
     return options.canLazilyParse &&
         options.compileAndGo &&
-        options.sourcePolicy == CompileOptions::SAVE_SOURCE;
+        options.sourcePolicy == CompileOptions::SAVE_SOURCE &&
+        !(cx->compartment()->debugMode() &&
+          cx->compartment()->runtimeFromAnyThread()->debugHooks.newScriptHook);
 }
 
 void
 frontend::MaybeCallSourceHandler(JSContext *cx, const CompileOptions &options,
                                  const jschar *chars, size_t length)
 {
     JSSourceHandler listener = cx->runtime()->debugHooks.sourceHandler;
     void *listenerData = cx->runtime()->debugHooks.sourceHandlerData;