Bug 1485676 - Prevent exceptions in the emulation actor when trying to use it while it is already destroyed. r=yulia
☠☠ backed out by 99b4f09fa32c ☠ ☠
authorAlexandre Poirot <poirot.alex@gmail.com>
Wed, 29 Aug 2018 06:12:29 -0700
changeset 493536 b1fd24929e093182025b28375a903f61bb821903
parent 493535 acb27b9157421ce17df320f13ec88e2798a89db4
child 493537 a83636fab16af5537d168c004f812633722e83f4
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyulia
bugs1485676
milestone64.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 1485676 - Prevent exceptions in the emulation actor when trying to use it while it is already destroyed. r=yulia Summary: Depends On D4540 Reviewers: yulia! Tags: #secure-revision Bug #: 1485676 Differential Revision: https://phabricator.services.mozilla.com/D4541 MozReview-Commit-ID: 2fTZ4WRq9je
devtools/server/actors/emulation.js
--- a/devtools/server/actors/emulation.js
+++ b/devtools/server/actors/emulation.js
@@ -43,17 +43,17 @@ const EmulationActor = protocol.ActorCla
   },
 
   /**
    * Retrieve the console actor for this tab.  This allows us to expose network throttling
    * as part of emulation settings, even though it's internally connected to the network
    * monitor, which for historical reasons is part of the console actor.
    */
   get _consoleActor() {
-    if (this.targetActor.exited) {
+    if (this.targetActor.exited || !this.targetActor.actorID) {
       return null;
     }
     const form = this.targetActor.form();
     return this.conn._getOrCreateActor(form.consoleActor);
   },
 
   /* DPPX override */