JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 2440: TypeError: tabbrowser.getTabForBrowser is not a function
Categories
(Core :: DOM: Content Processes, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox-esr68 | --- | wontfix |
firefox68 | --- | wontfix |
firefox69 | --- | wontfix |
firefox70 | --- | fixed |
People
(Reporter: whimboo, Assigned: mconley)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
Seen in various reftests as run via web-platform-tests like:
https://treeherder.mozilla.org/logviewer.html#?job_id=254712754&repo=mozilla-central
https://taskcluster-artifacts.net/XHgmUfhFSaeC5s_ZRx6NhA/0/public/logs/live_backing.log
Relevant code, which is part of onMayChangeProcess
:
I assume this has been caused by a new feature and is not a regression.
Comment 1•6 years ago
|
||
The priority flag is not set for this bug.
:mikedeboer, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•6 years ago
|
Comment 2•6 years ago
|
||
This seems relatively easy to fix, the check on the line before for tabbrowser
could be extended to also check the getTabForbrowser
method also exists.
Looking at the linked log, I see that there are a lot of assertions around gBrowser
not looking like expected as well coming from BrowserTabParent.jsm
. ni? :mconley in case they know why gBrowser would be in a "broken" state during this test.
06:27:59 INFO - PID 6480 | JavaScript error: resource:///actors/BrowserTabParent.jsm, line 27: TypeError: gBrowser.announceWindowCreated is not a function
06:27:59 INFO - PID 6480 | JavaScript error: , line 0: NS_ERROR_UNEXPECTED:
06:27:59 INFO - PID 6480 | 1562221679654 Marionette INFO Testing http://web-platform.test:8000/2dcontext/compositing/canvas_compositing_globalcompositeoperation_001.htm == http://web-platform.test:8000/2dcontext/compositing/canvas_compositing_globalcompositeoperation_001-ref.htm
06:27:59 INFO - PID 6480 | JavaScript error: resource:///actors/BrowserTabParent.jsm, line 27: TypeError: gBrowser.announceWindowCreated is not a function
06:27:59 INFO - PID 6480 | JavaScript error: , line 0: NS_ERROR_UNEXPECTED:
06:27:59 INFO - PID 6480 | JavaScript error: resource:///actors/BrowserTabParent.jsm, line 32: TypeError: browser.ownerGlobal.gBrowserInit is undefined
06:27:59 INFO - PID 6480 | JavaScript error: , line 0: NS_ERROR_UNEXPECTED:
06:27:59 INFO - PID 6480 | JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 2440: TypeError: tabbrowser.getTabForBrowser is not a function
06:27:59 INFO - PID 6480 | JavaScript error: resource:///actors/BrowserTabParent.jsm, line 27: TypeError: gBrowser.announceWindowCreated is not a function
06:27:59 INFO - PID 6480 | JavaScript error: , line 0: NS_ERROR_UNEXPECTED:
06:27:59 INFO - PID 6480 | JavaScript error: resource:///actors/BrowserTabParent.jsm, line 32: TypeError: browser.ownerGlobal.gBrowserInit is undefined
06:27:59 INFO - PID 6480 | JavaScript error: , line 0: NS_ERROR_UNEXPECTED:
06:28:00 INFO - PID 6480 | JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 2440: TypeError: tabbrowser.getTabForBrowser is not a function
06:28:00 INFO - PID 6480 | JavaScript error: resource:///actors/BrowserTabParent.jsm, line 27: TypeError: gBrowser.announceWindowCreated is not a function
06:28:00 INFO - PID 6480 | JavaScript error: , line 0: NS_ERROR_UNEXPECTED:
06:28:00 INFO - PID 6480 | JavaScript error: resource:///actors/BrowserTabParent.jsm, line 32: TypeError: browser.ownerGlobal.gBrowserInit is undefined
06:28:00 INFO - PID 6480 | JavaScript error: , line 0: NS_ERROR_UNEXPECTED:
Assignee | ||
Comment 3•6 years ago
|
||
I think a lot of those errors were fixed by the patch in bug 1561970 (see bug 1563495 and bug 1563498).
Reporter | ||
Comment 4•6 years ago
|
||
Note that this failure is still present in recent mozilla-central builds like:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=258720683&repo=mozilla-central&lineNumber=1017
Updated•6 years ago
|
Comment 5•6 years ago
|
||
Hi Mike, any thoughts on newer failures? Also, do we know if there's any real-world impact from these errors? Lost of session or anything?
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #5)
Hi Mike, any thoughts on newer failures? Also, do we know if there's any real-world impact from these errors? Lost of session or anything?
No, I think we're only hitting this because the refTest harness spoofs the gBrowser on a browser element to point to another browser:
It's doing this for reasons that are beyond me. I've attached a patch that causes the SessionStore code to use the <browser>.getTabBrowser() method to avoid the spoof. I really wonder why refTest needs to spoof it though. shrug
Assignee | ||
Updated•6 years ago
|
Reporter | ||
Comment 8•6 years ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) from comment #7)
No, I think we're only hitting this because the refTest harness spoofs the gBrowser on a browser element to point to another browser:
It's doing this for reasons that are beyond me. I've attached a patch that causes the SessionStore code to use the <browser>.getTabBrowser() method to avoid the spoof. I really wonder why refTest needs to spoof it though. shrug
James, do you have an idea why this code is used?
Comment 9•6 years ago
|
||
Essentially because the reftests run in a pretty strange window without the normal chrome (no tabs etc.) We need a reference to the browser element to call getBoundingClientRect
on it (although we could probably call getElementsByTagNameNs
or something). The specific approach of setting gBrowser
on the window to point at the Browser element was stolen from the reftest harness, but it looks like that code subsequently changed to just stash the browser in a global.
So, we can probably change the details here if necessary.
Comment 10•6 years ago
|
||
The priority flag is not set for this bug.
:jimm, could you have a look please?
For more information, please visit auto_nag documentation.
![]() |
||
Updated•6 years ago
|
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Updated•6 years ago
|
Updated•3 years ago
|
Description
•