mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 769254 - Part 1: Fix crashes in BrowserElementParent.cpp, TabChild.cpp on null URI to window-opening code. r=bz
Parts 2 and beyond will come at a later date.
This commit is contained in:
parent
45485bc982
commit
f6b8217588
@ -193,7 +193,9 @@ BrowserElementParent::OpenWindowInProcess(nsIDOMWindow* aOpenerWindow,
|
||||
NS_ENSURE_TRUE(popupFrameElement, false);
|
||||
|
||||
nsCAutoString spec;
|
||||
aURI->GetSpec(spec);
|
||||
if (aURI) {
|
||||
aURI->GetSpec(spec);
|
||||
}
|
||||
bool dispatchSucceeded =
|
||||
DispatchOpenWindowEvent(openerFrameElement, popupFrameElement,
|
||||
NS_ConvertUTF8toUTF16(spec),
|
||||
|
@ -53,6 +53,8 @@ public:
|
||||
* set aPopupTabParent's frame element to event.detail.frameElement.
|
||||
* Otherwise, we return false.
|
||||
*
|
||||
* @param aURL the URL the new window should load. The empty string is
|
||||
* allowed.
|
||||
* @param aOpenerTabParent the TabParent whose TabChild called window.open.
|
||||
* @param aPopupTabParent the TabParent inside which the opened window will
|
||||
* live.
|
||||
@ -75,6 +77,8 @@ public:
|
||||
*
|
||||
* (These parameter types are silly, but they match what our caller has in
|
||||
* hand. Feel free to add an override, if they are inconvenient to you.)
|
||||
*
|
||||
* @param aURI the URI the new window should load. May be null.
|
||||
*/
|
||||
static bool
|
||||
OpenWindowInProcess(nsIDOMWindow* aOpenerWindow,
|
||||
|
@ -385,7 +385,9 @@ TabChild::BrowserFrameProvideWindow(nsIDOMWindow* aOpener,
|
||||
/* aChromeFlags = */ 0, mIsBrowserElement, mAppId));
|
||||
|
||||
nsCAutoString spec;
|
||||
aURI->GetSpec(spec);
|
||||
if (aURI) {
|
||||
aURI->GetSpec(spec);
|
||||
}
|
||||
|
||||
NS_ConvertUTF8toUTF16 url(spec);
|
||||
nsString name(aName);
|
||||
|
Loading…
Reference in New Issue
Block a user