Bug 1657059 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

From what I can see, we get the errors because of "temporary" iframes. For instance, one of them is used to perform a oauth2 autentication and is later discarded. 

If I bail from `shouldNotifyWindowGlobal` when windowGlobal is null, the Browser Toolbox loads, but the website is no longer usable (cannot click anywhere etc...) until the BrowserToolbox is closed. As if we were pausing a thread and not resuming it.

There is also very frequently an error about preNest/windowUtils:
```
DBG-SERVER threw an exception: SecurityError: Permission denied to access property "windowUtils" on cross-origin object
Stack: preNest@resource://devtools/server/actors/utils/event-loop.js:157:31
enter@resource://devtools/server/actors/utils/event-loop.js:76:30
_pushThreadPause@resource://devtools/server/actors/thread.js:314:15
onAttach@resource://devtools/server/actors/thread.js:466:12
onPacket@resource://devtools/server/devtools-server-connection.js:379:58
receiveMessage@resource://devtools/shared/transport/child-transport.js:66:16
```

Fixing it doesn't avoid blocking the page either.
From what I can see, we get the errors because of "temporary" iframes. For instance, one of them is used to perform a oauth2 autentication and is later discarded. 

If I bail from `shouldNotifyWindowGlobal` when windowGlobal is null, the Browser Toolbox loads, but the website is no longer usable (cannot click anywhere etc...) until the BrowserToolbox is closed. As if we were pausing a thread and not resuming it.

There is also very frequently an error about preNest/windowUtils:
```
DBG-SERVER threw an exception: SecurityError: Permission denied to access property "windowUtils" on cross-origin object
Stack: preNest@resource://devtools/server/actors/utils/event-loop.js:157:31
enter@resource://devtools/server/actors/utils/event-loop.js:76:30
_pushThreadPause@resource://devtools/server/actors/thread.js:314:15
onAttach@resource://devtools/server/actors/thread.js:466:12
onPacket@resource://devtools/server/devtools-server-connection.js:379:58
receiveMessage@resource://devtools/shared/transport/child-transport.js:66:16
```

Fixing it doesn't avoid blocking the page either.

Edit: I confirmed that attaching the thread is responsible for blocking the page https://searchfox.org/mozilla-central/rev/72a1334982cadde0ca8b3d3583877afea80f5639/devtools/client/framework/toolbox.js#780-820

Back to Bug 1657059 Comment 2