Closed Bug 1660895 Opened 4 years ago Closed 4 years ago

Browser toolbox fail opening with "watchTargets can't access property 'browsingContext', windowGlobal is null" exception

Categories

(DevTools :: Framework, defect)

defect

Tracking

(Fission Milestone:M6c, firefox82 fixed)

RESOLVED FIXED
82 Branch
Fission Milestone M6c
Tracking Status
firefox82 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It looks like in the following code, we may process a BrowsingContext in process of creation or destruction, which doesn't have a WindowGlobal currently associated.
https://searchfox.org/mozilla-central/rev/19c23d725f27d0989e4a60f36d64004cebb39736/devtools/server/actors/watcher/target-helpers/frame-helper.js#179-188

  return getAllRemoteBrowsingContexts(
    browserElement?.browsingContext
  ).filter(browsingContext =>
    shouldNotifyWindowGlobal(
      browsingContext.currentWindowGlobal,
      browserElement?.browserId
    )
  );

And so, browsingContext.currentWindowGlobal ends up being null.

console.error: "Error while calling actor 'watcher's method 'watchTargets'" "can't access property \"browsingContext\", windowGlobal is null"
console.error: "shouldNotifyWindowGlobal@resource://devtools/server/actors/watcher/target-helpers/frame-helper.js:254:27\ngetFilteredRemoteBrowsingContext/<@resource://devtools/server/actors/watcher/target-helpers/frame-helper.js:183:29\ngetFilteredRemoteBrowsingContext@resource://devtools/server/actors/watcher/target-helpers/frame-helper.js:182:5\ncreateTargets@resource://devtools/server/actors/watcher/target-helpers/frame-helper.js:25:60\nwatchTargets@resource://devtools/server/actors/watcher.js:138:30\nhandler@resource://devtools/shared/protocol/Actor.js:166:37\nonPacket@resource://devtools/server/devtools-server-connection.js:379:58\n_onJSONObjectReady/<@resource://devtools/shared/transport/transport.js:464:22\nexports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22\nexports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22\n"
Assignee: nobody → poirot.alex
Fission Milestone: --- → M6c
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/def80b3ac3f6
Eagerly ignore loading or destroying documents. r=nchevobbe
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Regressions: 1503499
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: