Bug 1233803 - Get rid of of sessionHistory CPOW sent up via WebNavigation:SetHistory message
Roadmap of this bug:
- Get rid of all in-browser usages of sessionHistory CPOW
- Add guard to prevent new in-browser usages of sessionHistory CPOW
- Add shim to allow add-on (and mochitest) usage of sessionHistory CPOW
Eff - test failures:
TEST-UNEXPECTED-FAIL |
toolkit/modules/tests/browser/browser_RemoteWebNavigation.js | Uncaught
exception - at
chrome://mochitests/content/browser/toolkit/modules/tests/browser/browser_RemoteWebNavigation.js:62
- TypeError: history is null
TEST-UNEXPECTED-FAIL |
toolkit/modules/tests/browser/browser_RemoteWebNavigation.js | Uncaught
exception - at
chrome://mochitests/content/browser/toolkit/modules/tests/browser/browser_RemoteWebNavigation.js:103
- TypeError: history is null
TEST-UNEXPECTED-FAIL |
browser/components/sessionstore/test/browser_687710_2.js | A promise
chain failed to handle a rejection: - at
chrome://mochitests/content/browser/browser/components/sessionstore/test/browser_687710_2.js:36
TEST-UNEXPECTED-FAIL |
browser/base/content/test/general/browser_bug623893.js | uncaught
exception - TypeError: gBrowser.sessionHistory is null at
chrome://mochitests/content/browser/browser/base/content/test/general/browser_bug623893.js:28
Huh… we might want to actually make sure that we keep the
RemoteWebNavigation tests for sessionHistory to make sure that accessing
the shims still work. So we need to test and address the above.
So one thing I wanted to do was add a sessionHistory shim - that was
#3. Unfortunately, I ran into issues, stemming from the fact that
RemoteWebNavigation is not created like a traditional XPCOM component,
but sidesteps the XPCOM stuff because it’s new’d directly from the
RemoteWebNavigation infrastructure.
So I’d like to try an experiment where we create RemoteWebNavigation’s
via createInstance. That, I believe, will let us create shims for it.
See what else uses RemoteWebNavigation to see what I’ll break
Pretty much nothing, thank goodness. Belongs to remote-browser.xml, and some tests.
Create some directory under toolkit/components, call it “remotebrowserutils” for now
Create a unique class ID thing for the remote browser nsIWebNavigation.
Move the implementation into remotebrowserutils
Hook up the moz.build stuff and make sure it builds
Have remote-browser.xml instantiate our RemoteWebNavigation using createInstance
Have remote-browser.xml call swapBrowser using wrappedJSObject
Write a simple shim that makes sure we’re using a RemoteWebNavigation,
and then gets at the underlying browser, and resolves it to a docShell
CPOW using RemoteAddonsParent.browserToGlobal.get(target), and then
returns docShell.sessionHistory.
Run the tests and see if they pass
BAH - the package-manifest thing wasn’t in there. :/
Try AGAIN build:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=908db6ef1d93
BAH - and apparently I need to include .manifest in package-manifest as well. MANIFEST IN YOUR MANIFEST.
Ah, and I need to make sure that I swap browsers correctly...