Bug 1508287 - Ensure exposing `console` to modules loaded for worker server. r=yulia
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 22 Nov 2018 15:23:15 +0000
changeset 504186 fc10fcd1506648228b059419d4df5c3e895155c6
parent 504185 d997f8cd27fc9e7a8fb31ad648d2d29d3c3525f3
child 504187 c56b523e11e6fc73804ede8264aed1045a627ab1
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyulia
bugs1508287
milestone65.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 1508287 - Ensure exposing `console` to modules loaded for worker server. r=yulia Without this devtools/server/tests/unit/test_breakpoint-22.js fails in protocol.js writeError function when trying to use console object. MozReview-Commit-ID: JFhFboHugUh Differential Revision: https://phabricator.services.mozilla.com/D12309
devtools/shared/worker/loader.js
--- a/devtools/shared/worker/loader.js
+++ b/devtools/shared/worker/loader.js
@@ -559,16 +559,17 @@ this.worker = new WorkerDebuggerLoader({
     "reportError": reportError,
     "rpc": rpc,
     "URL": URL,
     "setImmediate": setImmediate,
     "lazyRequire": lazyRequire,
     "lazyRequireModule": lazyRequireModule,
     "retrieveConsoleEvents": this.retrieveConsoleEvents,
     "setConsoleEventHandler": this.setConsoleEventHandler,
+    "console": console,
   },
   loadSubScript: loadSubScript,
   modules: {
     "Debugger": Debugger,
     "Services": Object.create(null),
     "chrome": chrome,
     "xpcInspector": xpcInspector,
   },