Bug 1323466 - Lazy load protocol.js from actors/common.js to prevent loading it in parent process. r=jryans draft
authorAlexandre Poirot <poirot.alex@gmail.com>
Wed, 14 Dec 2016 08:36:23 -0800
changeset 451123 63d51bbd8e9685da2c8f59d778293d12a871f796
parent 451122 b349fdc3cbc0d11ada45453d205fd1d593cc8df0
child 451124 4d399d14578f691501cc677640f8b45d87ad906d
child 451186 4ec307062b4d5e8f61cae9fd7da2c4f4e7bd38a7
push id39053
push userbmo:poirot.alex@gmail.com
push dateMon, 19 Dec 2016 17:05:58 +0000
reviewersjryans
bugs1323466
milestone53.0a1
Bug 1323466 - Lazy load protocol.js from actors/common.js to prevent loading it in parent process. r=jryans MozReview-Commit-ID: 1NtALPw7N6k
devtools/server/actors/common.js
--- a/devtools/server/actors/common.js
+++ b/devtools/server/actors/common.js
@@ -2,17 +2,17 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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";
 
 const promise = require("promise");
-const { method } = require("devtools/shared/protocol");
+loader.lazyRequireGetter(this, "method", "devtools/shared/protocol", true);
 
 /**
  * Creates "registered" actors factory meant for creating another kind of
  * factories, ObservedActorFactory, during the call to listTabs.
  * These factories live in DebuggerServer.{tab|global}ActorFactories.
  *
  * These actors only exposes:
  * - `name` string attribute used to match actors by constructor name