Thunderbird mochitest, JavaScript error: resource://gre/actors/BrowserElementParent.jsm, line 81: TypeError: can't access property "ownerGlobal", browser is null
Categories
(Thunderbird :: General, defect)
Tracking
(Not tracked)
People
(Reporter: ishikawa, Unassigned)
Details
Attachments
(1 file)
This is cloned from bug 1608796.
I get a set of consistent errors (unlike bug 1608796)
during local execution of mochitest with DEBUG version of thunderbird.
From bug 1608796 comment 12.:
There seems to be a very similar problem which is visible in the local run of thunderbird mochitest (running FULL DEBUG version of thunderbird).
6 Console message: [JavaScript Error: "TypeError: can't access property "ownerGlobal", browser is null" {file: "resource://gre/actors/BrowserElementParent.jsm" line: 81}]
https://searchfox.org/mozilla-central/source/toolkit/actors/BrowserElementParent.jsm#81
case "DOMWindowClose": {
// This message is sent whenever window.close() is called within a window
// that had originally been opened via window.open. Double-check that this is
// coming from a top-level frame, and then dispatch the DOMWindowClose event
// on the browser so that the front-end code can do the right thing with the
// request to close.
if (!this.manager.browsingContext.parent) {
let browser = this.manager.browsingContext.embedderElement;
let win = browser.ownerGlobal; <=====
// If this is a non-remote browser, the DOMWindowClose event will bubble
// up naturally, and doesn't need to be re-dispatched.
if (browser.isRemoteBrowser) {
browser.dispatchEvent(
new win.CustomEvent("DOMWindowClose", {
bubbles: true,
})
Shall I file a different bugzilla since this is a different file (https://searchfox.org/mozilla-central/source/toolkit/actors/BrowserElementParent.jsm#81 ) and from a different test?
But I suspect there is a similar underlying cause.
===> I am cloning a different bugzilla here.
There seems to be a very similar problem which is visible in the local run of thunderbird mochitest (running FULL DEBUG version of thunderbird).
6 Console message: [JavaScript Error: "TypeError: can't access property "ownerGlobal", browser is null" {file: "resource://gre/actors/BrowserElementParent.jsm" line: 81}]
The errors in comment 12 are visible on tryserver job as well.
For example.:
https://firefoxci.taskcluster-artifacts.net/SOz6SbgLQ6eB4IClYRdqqQ/0/public/logs/live_backing.log
I think this is architecture neutral and so set the architecture to all/all.
| Reporter | ||
Comment 1•5 years ago
|
||
The typical trace shown at the time of the error is like this. uid in the last few lines change, bu they are from popup.js.
:38.07 GECKO(1838005) JavaScript error: resource://gre/actors/BrowserElementParent.jsm, line 81: TypeError: can't access property "ownerGlobal", browser is null
42:38.07 INFO Console message: [JavaScript Error: "TypeError: can't access property "ownerGlobal", browser is null" {file: "resource://gre/actors/BrowserElementParent.jsm" line: 81}]
receiveMessage@resource://gre/actors/BrowserElementParent.jsm:81:21
JSActor queryhandleEvent@resource://gre/actors/BrowserElementChild.jsm:15:12
window.onload@moz-extension://f362f9bf-5572-46f6-84e4-34f7b530842f/popup.js:6:18
async@moz-extension://f362f9bf-5572-46f6-84e4-34f7b530842f/popup.js:2:9
@moz-extension://f362f9bf-5572-46f6-84e4-34f7b530842f/popup.js:8:9
The test files that cause the errors in local mochitest with DEBUG version of TB is shown in the attachment.
It is a cleaned up excerpt of the output from the following command.
egrep "(TEST_START|TEST_END|Entering test|Leaving test|browser is null)" /FF-NEW/log1226-mochitest.txt
Updated•5 years ago
|
| Reporter | ||
Comment 2•5 years ago
|
||
I still see this error after refreshing M-C/C-C tree locally on my PC:
63:29.64 GECKO(253101) JavaScript error: resource://gre/actors/BrowserElementParent.jsm, line 81: TypeError: can't access property "ownerGlobal", browser is null
63:29.70 INFO Console message: [JavaScript Error: "TypeError: can't access property "ownerGlobal", browser is null" {file: "resource://gre/actors/BrowserElementParent.jsm" line: 81}]
receiveMessage@resource://gre/actors/BrowserElementParent.jsm:81:21
JSActor query*handleEvent@resource://gre/actors/BrowserElementChild.jsm:15:12
window.onload@moz-extension://e93375b8-30e5-4ecd-a938-8fd911bfae01/popup.js:6:18
async*@moz-extension://e93375b8-30e5-4ecd-a938-8fd911bfae01/popup.js:2:9
@moz-extension://e93375b8-30e5-4ecd-a938-8fd911bfae01/popup.js:8:9
https://searchfox.org/comm-central/source/mozilla/toolkit/actors/BrowserElementChild.jsm#15
class BrowserElementChild extends JSWindowActorChild {
handleEvent(event) {
if (
event.type == "DOMWindowClose" &&
!this.manager.browsingContext.parent
) {
this.sendAsyncMessage("DOMWindowClose", {}); <====
}
}
Is it possible that when the Async message reaches the final destination, the window hierarchy has changed a bit invalidating the implicit assumption regarding the hierarchy such as parent-child/sibling relation?
Comment 3•5 years ago
|
||
I think this needs investigating from the Thunderbird side first - there's nothing obviously actionable here without building it. Seeing as it is permanent, I would suggest looking at exactly what this.manager.browsingContext.embedderElement is and why that's null on Thunderbird. Is it actually something different to what is being returned on Firefox? Or maybe something is missing on Thunderbird because it hasn't got the multiprocess facilities yet.
| Reporter | ||
Comment 4•5 years ago
•
|
||
I will print the value of
this.
this.manager
this.manager.browsingContext
at the time error occurs.
| Reporter | ||
Comment 5•5 years ago
|
||
BTW, there are similar problems on the firefox side, but in different contexts, I think.
bug 1641030 TypeError: can't access property "ownerGlobal", aBrowser is null WebExtensions
bug 1608796 Intermittent browser/base/content/test/webrtc/browser_devices_get_user_media_multi_process.js | Uncaught exception - undefined - threw exception: TypeError: can't access property "ownerGlobal", browser is null
| Reporter | ||
Comment 6•5 years ago
|
||
(In reply to ISHIKAWA, Chiaki from comment #4)
I will print the value of
this.
this.manager
this.manager.browsingContext
at the time error occurs.
Well, simple dump is useless. All places where the code is executed, I get something like the following.
57:44.47 GECKO(578059) this = [object JSWindowActorParent]
57:44.47 GECKO(578059) this.manager = [object WindowGlobalParent]
57:44.47 GECKO(578059) this.manager.browsingContext = [object CanonicalBrowsingContext]
57:44.47 GECKO(578059) this.manager.browsingContext.embedderElement = null
I think I need to print the various properties of |CanonicalBrowsingContext| and |WindowGlobalParent|.
Are there functions to print such properties?
(A surprise is that all the places the code gets executed, embedderElement == null.)
| Reporter | ||
Comment 7•5 years ago
|
||
I forgot to add the context dumped by console.trace().
57:53.17 GECKO(578059) console.trace:
57:53.17 GECKO(578059) resource://gre/actors/BrowserElementParent.jsm 82 receiveMessage
57:53.17 GECKO(578059) resource://gre/actors/BrowserElementChild.jsm 15 handleEvent
57:53.17 GECKO(578059) moz-extension://68507884-8907-4169-b289-2b1190490f90/popup.js 6 window.onload
57:53.17 GECKO(578059) moz-extension://68507884-8907-4169-b289-2b1190490f90/popup.js 2
57:53.17 GECKO(578059) moz-extension://68507884-8907-4169-b289-2b1190490f90/popup.js 8
57:53.17 GECKO(578059) this = [object JSWindowActorParent]
57:53.17 GECKO(578059) this.manager = [object WindowGlobalParent]
57:53.17 GECKO(578059) this.manager.browsingContext = [object CanonicalBrowsingContext]
57:53.17 GECKO(578059) this.manager.browsingContext.embedderElement = null
57:53.17 GECKO(578059) JavaScript error: resource://gre/actors/BrowserElementParent.jsm, line 90: TypeError: can't access property "ownerGlobal", browser is null
57:53.18 INFO Console message: [JavaScript Error: "TypeError: can't access property "ownerGlobal", browser is null" {file: "resource://gre/actors/BrowserElementParent.jsm" line: 90}]
receiveMessage@resource://gre/actors/BrowserElementParent.jsm:90:21
JSActor query*handleEvent@resource://gre/actors/BrowserElementChild.jsm:15:12
window.onload@moz-extension://68507884-8907-4169-b289-2b1190490f90/popup.js:6:18
async*@moz-extension://68507884-8907-4169-b289-2b1190490f90/popup.js:2:9
@moz-extension://68507884-8907-4169-b289-2b1190490f90/popup.js:8:9
In four places where I saw this dump, basically the trace is the same except that uuid is different each time.
Maybe it is during popup menu handling or something (?).
Description
•