JavaScript Error: "can't access property "id", nativeTabInfo.browser is undefined" {file: "chrome://messenger/content/parent/ext-mail.js" line: 504
Categories
(Thunderbird :: General, defect)
Tracking
(Not tracked)
People
(Reporter: ishikawa, Unassigned)
Details
Attachments
(1 file)
I started to see the following error message starting on June 6 during my local mochitest run of C-C TB debug version.
I did not see it on May 30th. So this is relatively new.
Console message: [JavaScript Error: "can't access property "id", nativeTabInfo.browser is undefined" {file: "chrome://messenger/content/parent/ext-mail.js" line: 505}]
The error happens during the local execution of
comm/mail/components/extensions/test/browser/browser_ext_tabs_events.js
twice. The stack dump printed during the test:
59:15.23 TEST_START: comm/mail/components/extensions/test/browser/browser_ext_tabs_events.js
59:15.24 INFO Entering test bound
59:15.25 GECKO(466041) {streamdebug} closing: unusedDB (= 0x7fe5d4232480 )->Close() 'before Close(true)' in CreateFolder at line 122 of /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/local/src/nsMsgBrkMBoxStore.cpp
...
...
59:28.86 INFO Remove the first content tab. This was not active so no new tab should be activated.
59:29.34 GECKO(466041) [466041, Main Thread] WARNING: '!inner', file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/ipc/JSWindowActorProtocol.cpp, line 172
59:29.55 INFO ["onRemoved",70,{"windowId":3,"isWindowClosing":false}]
59:29.56 INFO Remove the second content tab. This was active, and the calendar tab is after it, so that should be activated.
59:29.82 INFO ["onRemoved",71,{"windowId":3,"isWindowClosing":false}]
59:29.82 INFO ["onActivated",{"tabId":72,"windowId":3}]
59:29.83 INFO Remove the remaining tabs.
59:29.83 INFO Console message: [JavaScript Error: "can't access property "id", nativeTabInfo.browser is undefined" {file: "chrome://messenger/content/parent/ext-mail.js" line: 504}]
_handleTabDestroyed@chrome://messenger/content/parent/ext-mail.js:504:12
emit@resource://gre/modules/ExtensionCommon.jsm:327:32
emitRemoved@chrome://messenger/content/parent/ext-mail.js:718:10
handleEvent@chrome://messenger/content/parent/ext-mail.js:567:16
closeTab@chrome://messenger/content/tabmail.js:1224:15
remove@chrome://messenger/content/parent/ext-tabs.js:446:21
recvAPICall/result</<@resource://gre/modules/ExtensionParent.jsm:877:68
withPendingBrowser@resource://gre/modules/ExtensionParent.jsm:483:26
recvAPICall/result<@resource://gre/modules/ExtensionParent.jsm:877:24
callAndLog@resource://gre/modules/ExtensionParent.jsm:839:14
recvAPICall@resource://gre/modules/ExtensionParent.jsm:876:25
Async*_recv@resource://gre/modules/ConduitsChild.jsm:78:20
receiveMessage@resource://gre/modules/ConduitsParent.jsm:357:20
JSActor query*_send@resource://gre/modules/ConduitsChild.jsm:63:11
_send@resource://gre/modules/ConduitsChild.jsm:111:18
callParentAsyncFunction@resource://gre/modules/ExtensionChild.jsm:826:18
callAsyncFunction@resource://gre/modules/ExtensionChild.jsm:590:33
stub@resource://gre/modules/Schemas.jsm:2682:30
@moz-extension://bbb6108b-787e-4055-99f8-52381f6d712f/%7Bd10b4271-a198-44a8-be88-b02faf556b33%7D.js:269:28
async*@moz-extension://bbb6108b-787e-4055-99f8-52381f6d712f/%7Bd10b4271-a198-44a8-be88-b02faf556b33%7D.js:283:7
59:29.97 INFO ["onRemoved",73,{"windowId":3,"isWindowClosing":false}]
59:30.18 INFO ["onRemoved",75,{"windowId":3,"isWindowClosing":false}]
59:30.46 INFO ["onRemoved",76,{"windowId":3,"isWindowClosing":false}]
59:30.64 GECKO(466041) {debug}:ASSERTION: ! (aISizeType == BTLS_FINAL_ISIZE && aISize < guess_min), /NEW-SSD/NREF-COMM-CENTRAL/mozilla/layout/tables/BasicTableLayoutStrategy.cpp, line=762
59:30.64 GECKO(466041) aISizeType=2, BTLS_FINALSIZE=2
59:30.64 GECKO(466041) aISize=0, guess_min=10203, guess_pref=10203
59:30.64 GECKO(466041) parent at the position [2] is XULBox.
59:30.64 GECKO(466041) {debug} This strange situation is with XULBox Frame. Just ignore it for now.
...
59:30.80 INFO ["onRemoved",74,{"windowId":3,"isWindowClosing":false}]
59:30.80 INFO Console message: [JavaScript Error: "can't access property "id", nativeTabInfo.browser is undefined" {file: "chrome://messenger/content/parent/ext-mail.js" line: 504}]
_handleTabDestroyed@chrome://messenger/content/parent/ext-mail.js:504:12
emit@resource://gre/modules/ExtensionCommon.jsm:327:32
emitRemoved@chrome://messenger/content/parent/ext-mail.js:718:10
handleEvent@chrome://messenger/content/parent/ext-mail.js:567:16
closeTab@chrome://messenger/content/tabmail.js:1224:15
remove@chrome://messenger/content/parent/ext-tabs.js:446:21
recvAPICall/result</<@resource://gre/modules/ExtensionParent.jsm:877:68
withPendingBrowser@resource://gre/modules/ExtensionParent.jsm:483:26
recvAPICall/result<@resource://gre/modules/ExtensionParent.jsm:877:24
callAndLog@resource://gre/modules/ExtensionParent.jsm:839:14
recvAPICall@resource://gre/modules/ExtensionParent.jsm:876:25
Async*_recv@resource://gre/modules/ConduitsChild.jsm:78:20
receiveMessage@resource://gre/modules/ConduitsParent.jsm:357:20
JSActor query*_send@resource://gre/modules/ConduitsChild.jsm:63:11
_send@resource://gre/modules/ConduitsChild.jsm:111:18
callParentAsyncFunction@resource://gre/modules/ExtensionChild.jsm:826:18
callAsyncFunction@resource://gre/modules/ExtensionChild.jsm:590:33
stub@resource://gre/modules/Schemas.jsm:2682:30
@moz-extension://bbb6108b-787e-4055-99f8-52381f6d712f/%7Bd10b4271-a198-44a8-be88-b02faf556b33%7D.js:269:28
async*@moz-extension://bbb6108b-787e-4055-99f8-52381f6d712f/%7Bd10b4271-a198-44a8-be88-b02faf556b33%7D.js:283:7
59:30.95 INFO ["onRemoved",72,{"windowId":3,"isWindowClosing":false}]
59:30.96 INFO ["onActivated",{"tabId":1,"windowId":3}]
59:31.00 GECKO(466041) [466041, Main Thread] WARNING: '!inner', file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/ipc/JSWindowActorProtocol.cpp, line 172
59:31.12 INFO Leaving test bound
It is strange that I cannot find the message in try server jobs.
Hmm. It is possible that some patches I applied to work around some other javascript errors might have let the program to proceed further then hit this issue, OR
more likely it can be timing dependent. Like, for example, nativeTabInfo.browser can be defined or yet defined based on some asynchronous layout/processing/loading of javascript, etc. (Surely I see Async*_recv in the stacktrace.) That I see "Removed" in the log suggests that this may happen after a removal of a window or something? Ouch.
| Reporter | ||
Comment 1•6 years ago
•
|
||
Full log of mochitest comm/mail/components/extensions/test/browser/browser_ext_tabs_events.js is attached.
It is very verbose because of local patches to trace file stream usage, etc.
One may wonder if the local patches are to blame.
However, as I mentioned in the original post, the error was not visible until June 6th. On May 30th (and previously) it was not visible. So something changed at the start of June or the end of May.
The message that precedes the first error is very suggestive of the async nature of the bug that may follow the removal of a tab and and another tab activation.:
54:41.65 INFO Remove the second content tab. This was active, and the calendar tab is after it, so that should be activated.
This is from Bug 1641345. Tabs without |browser| will do this when closed (chat sometimes, calendar tabs, etc). It's easy enough to change it to:
let browser = getTabBrowser(nativeTabInfo);
if (browser) {
this._browsers.set(`${browser.id}#${nativeTabInfo.tabId}`, id);
}
but this is one of the things Bug 1649035 is about.
| Reporter | ||
Comment 3•6 years ago
|
||
(In reply to alta88 from comment #2)
This is from Bug 1641345. Tabs without |browser| will do this when closed (chat sometimes, calendar tabs, etc). It's easy enough to change it to:
let browser = getTabBrowser(nativeTabInfo); if (browser) { this._browsers.set(`${browser.id}#${nativeTabInfo.tabId}`, id); }but this is one of the things Bug 1649035 is about.
Hmm...
So we need a somewhat extensive housechore to take care of this whole WE compatibility?
Or should I create a bandage patch to do the above in the meantime (not sure how long/short this meantime would be).?
Comment 4•6 years ago
|
||
(In reply to ISHIKAWA, Chiaki from comment #3)
(In reply to alta88 from comment #2)
This is from Bug 1641345. Tabs without |browser| will do this when closed (chat sometimes, calendar tabs, etc). It's easy enough to change it to:
let browser = getTabBrowser(nativeTabInfo); if (browser) { this._browsers.set(`${browser.id}#${nativeTabInfo.tabId}`, id); }but this is one of the things Bug 1649035 is about.
Hmm...
So we need a somewhat extensive housechore to take care of this whole WE compatibility?
Or should I create a bandage patch to do the above in the meantime (not sure how long/short this meantime would be).?
John, are you able to comment on this?
Comment 5•6 years ago
|
||
I do not yet have the full oversight and have not yet stepped into the API business. Breaking WE API is of course not good. Maybe Geoff has the better answer here. I would not break the API in a TB78 point release, I think.
Updated•5 years ago
|
Description
•