Closed Bug 1394520 Opened 7 years ago Closed 7 years ago

Links with target=_blank don't load with e10s

Categories

(GeckoView Graveyard :: Sandboxing, enhancement)

51 Branch
All
Android
enhancement
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: esawin, Assigned: esawin)

References

Details

Attachments

(3 files, 3 obsolete files)

In bug 1377580 we've enabled handling of external links in GeckoView with in e10s disabled, in this bug we address the e10s case.
This is based on the approach used in bug 1377580, we extend nsIBrowserDOMWindow to distinguish between opening an URI and creating a window while still passing the URI through. This time I found it easier (requires fewer Gecko changes) to keep the URI optional for the openURI case.
Attachment #8901996 - Flags: review?(bugs)
The implementation of createContentWindowInFrame for GeckoView is identical to its createContentWindow implementation (except for the arguments), but it might be better to keep them separated for future changes.
Attachment #8901999 - Flags: review?(snorp)
In general, could you create diffs with -p -U 8
Comment on attachment 8901996 [details] [diff] [review] 0001-Bug-1394520-1.0-Extend-nsIBrowserDOMWindow-to-suppor.patch >+++ b/browser/base/content/browser.js >@@ -5346,6 +5346,13 @@ nsBrowserAccess.prototype = { > return newWindow; > }, > >+ createContentWindowInFrame: function browser_createContentWindowInFrame( >+ aURI, aParams, aWhere, aFlags, aNextTabParentId, >+ aName) { >+ return this.openURIInFrame(null, aParams, aWhere, aFlags, aNextTabParentId, >+ aName); This definitely needs some comment why null is passed as uri to openURIInFrame. >+++ b/dom/interfaces/base/nsIBrowserDOMWindow.idl >@@ -26,7 +26,7 @@ interface nsIOpenURIInFrameParams : nsISupports > readonly attribute jsval openerOriginAttributes; > }; > >-[scriptable, uuid(2a9bb880-5d73-40f3-8152-c60c8d137a14)] >+[scriptable, uuid(b7f0dff6-75bf-4ae7-ae68-205f17b87180)] no need for this change. > nsCOMPtr<nsIFrameLoaderOwner> frameLoaderOwner; >- aResult = browserDOMWin->OpenURIInFrame(aURIToLoad, params, openLocation, >- nsIBrowserDOMWindow::OPEN_NEW, >- aNextTabParentId, aName, >- getter_AddRefs(frameLoaderOwner)); >+ if (aURIToLoad && aLoadURI) { >+ aResult = browserDOMWin->OpenURIInFrame(aURIToLoad, >+ params, openLocation, >+ nsIBrowserDOMWindow::OPEN_NEW, >+ aNextTabParentId, aName, >+ getter_AddRefs(frameLoaderOwner)); >+ } else { >+ aResult = browserDOMWin->CreateContentWindowInFrame(aURIToLoad, >+ params, openLocation, >+ nsIBrowserDOMWindow::OPEN_NEW, >+ aNextTabParentId, aName, >+ getter_AddRefs(frameLoaderOwner)); >+ } Why aURIToLoad needs to be non-null? Does this work with something like window.open(null, null, "noopener"); (or looks like that crashes currenly, but it should work) r- because I'd like to see some comments in the code and clarification how passing null url is supposed to work.
Attachment #8901996 - Flags: review?(bugs) → review-
Attachment #8901999 - Flags: review?(snorp) → review+
Sorry for the delay. I've addressed your comments - null-URIs should now be accepted (loading "about:blank").
Attachment #8901996 - Attachment is obsolete: true
Attachment #8913341 - Flags: review?(bugs)
Rebased using the new load-URI handler.
Attachment #8901999 - Attachment is obsolete: true
Attachment #8913343 - Flags: review+
We should accept null-URIs and load "about:blank" same as the other platforms.
Attachment #8913344 - Flags: review?(snorp)
Attachment #8913344 - Flags: review?(snorp) → review+
Comment on attachment 8913341 [details] [diff] [review] 0001-Bug-1.1-Extend-nsIBrowserDOMWindow-to-support-conten.patch Passing aURIToLoad and aLoadURI is rather confusing. Please document those CommonCreateWindow params.
Attachment #8913341 - Flags: review?(bugs) → review+
Added code comment.
Attachment #8913341 - Attachment is obsolete: true
Attachment #8913397 - Flags: review+
Pushed by esawin@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/7f980b17c3b9 [1.2] Extend nsIBrowserDOMWindow to support content window creation without URI loading with e10s. r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/e176fee9dc7e [2.1] Add support for external URI loading with e10s in GeckoView. r=snorp https://hg.mozilla.org/integration/mozilla-inbound/rev/2bffa263522b [3.0] Translate null-URI to "about:blank" for URI loading requests. r=snorp
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 58 → mozilla58

Moving some e10s bugs to the new GeckoView::Sandboxing component.

Component: General → Sandboxing
Product: GeckoView → GeckoView Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: