Bug 1582577 - Refactor a data: loadProcessScript from DevTools r=ochameau
authorTom Ritter <tom@mozilla.com>
Tue, 24 Sep 2019 15:24:33 +0000
changeset 495774 c642c18c31ba2b4c751b45e1409b22df1a051c6b
parent 495773 c06273b257694bd36d2ecff45d351c9bdd638b4a
child 495775 476871bfa799ee48aa2c60b67cd9afabd47a508a
push id36638
push usershindli@mozilla.com
push dateWed, 02 Oct 2019 03:38:52 +0000
treeherdermozilla-central@cb9bbf38fa45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1582577
milestone71.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 1582577 - Refactor a data: loadProcessScript from DevTools r=ochameau Differential Revision: https://phabricator.services.mozilla.com/D46954
devtools/server/actors/process.js
devtools/server/startup/debug-new-process.js
devtools/server/startup/moz.build
--- a/devtools/server/actors/process.js
+++ b/devtools/server/actors/process.js
@@ -12,17 +12,17 @@ loader.lazyGetter(this, "ppmm", () => {
 
 function ProcessActorList() {
   this._actors = new Map();
   this._onListChanged = null;
   this._mustNotify = false;
 
   this._onMessage = this._onMessage.bind(this);
   this._processScript =
-    "data:text/javascript,sendAsyncMessage('debug:new-process');";
+    "resource://devtools/server/startup/debug-new-process.js";
 }
 
 ProcessActorList.prototype = {
   getList: function() {
     const processes = [];
     for (let i = 0; i < ppmm.childCount; i++) {
       processes.push({
         // XXX: may not be a perfect id, but process message manager doesn't
new file mode 100644
--- /dev/null
+++ b/devtools/server/startup/debug-new-process.js
@@ -0,0 +1,9 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+/* global sendAsyncMessage */
+
+sendAsyncMessage("debug:new-process");
--- a/devtools/server/startup/moz.build
+++ b/devtools/server/startup/moz.build
@@ -2,11 +2,12 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DevToolsModules(
     'content-process.js',
     'content-process.jsm',
+    'debug-new-process.js',
     'frame.js',
     'worker.js',
 )