Bug 1278070 - Baldr: save bytecode when console open to any pane, not just debugger (r=shu)
authorLuke Wagner <luke@mozilla.com>
Mon, 06 Jun 2016 18:01:33 -0500
changeset 376162 d6aea1ba992f47371228e66b7774761cb5326bae
parent 376161 a35b9743df321f79b1d669517fae209b46eb0cd7
child 376163 189923b75373b22b5edcc30ef97e1b8d87f587ec
push id20510
push usercholler@mozilla.com
push dateTue, 07 Jun 2016 13:42:30 +0000
reviewersshu
bugs1278070
milestone50.0a1
Bug 1278070 - Baldr: save bytecode when console open to any pane, not just debugger (r=shu) MozReview-Commit-ID: CT7N7wn1BPB
js/src/asmjs/Wasm.cpp
js/src/asmjs/WasmModule.cpp
--- a/js/src/asmjs/Wasm.cpp
+++ b/js/src/asmjs/Wasm.cpp
@@ -1317,17 +1317,17 @@ wasm::Eval(JSContext* cx, Handle<TypedAr
 
     RootedObject exportObj(cx);
     if (!module.dynamicallyLink(cx, moduleObj, heap, imports, *exportMap, &exportObj))
         return false;
 
     if (!CreateInstance(cx, exportObj, instance))
         return false;
 
-    if (cx->compartment()->debuggerObservesAsmJS()) {
+    if (cx->compartment()->isDebuggee()) {
         Bytes source;
         if (!source.append(bytes, length))
             return false;
         module.setSource(Move(source));
     }
 
     Debugger::onNewWasmModule(cx, moduleObj);
     return true;
--- a/js/src/asmjs/WasmModule.cpp
+++ b/js/src/asmjs/WasmModule.cpp
@@ -1372,17 +1372,17 @@ const char experimentalWarning[] =
     "| (_,_) \\ |  |   _.-`   | (_,_). '. |  _( )_/ |  |\n"
     "|  |/    \\|  |.'   _    |.---.  \\  :| (_ o _) |  |\n"
     "|  '  /\\  `  ||  _( )_  |\\    `-'  ||  (_,_)  |  |\n"
     "|    /  \\    |\\ (_ o _) / \\       / |  |      |  |\n"
     "`---'    `---` '.(_,_).'   `-...-'  '--'      '--'\n"
     "text support (Work In Progress):\n\n";
 
 const char enabledMessage[] =
-    "Restart with debugger open to view WebAssembly source";
+    "Restart with developer tools open to view WebAssembly source";
 
 JSString*
 Module::createText(JSContext* cx)
 {
     StringBuffer buffer(cx);
     if (!source_.empty()) {
         if (!buffer.append(experimentalWarning))
             return nullptr;