Bug 1276013 - fix regression in e10s window name handling, r=mconley, a=dveditz
authorOlli Pettay [:smaug] <bugs@pettay.fi>
Fri, 03 Jun 2016 06:30:30 +0200
changeset 333213 effbb9ad4e93c4383e484f3a515d23194d3c6329
parent 333212 3430eb949ea6ea7d31c18212fedd7e8f0a2d96c4
child 333214 62258e4119aa3484bb11180d64b4e8606fdfd53f
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, dveditz
bugs1276013
milestone48.0a2
Bug 1276013 - fix regression in e10s window name handling, r=mconley, a=dveditz
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -5547,20 +5547,23 @@ ContentParent::RecvCreateWindow(PBrowser
 
   TabParent::AutoUseNewTab aunt(newTab, aWindowIsNew, aURLToLoad);
 
   // If nsWindowWatcher::OpenWindowInternal was passed a nullptr for the URI
   // to open in the content process, we indicate that by sending up a voided
   // nsString (since primitives are not nullable). If we detect the voided
   // nsString, we know that we need to send OpenWindow2 a nullptr for the URI.
   const char* uri = aURI.IsVoid() ? nullptr : finalURIString.get();
-  const char* name = aName.IsVoid() ? nullptr : NS_ConvertUTF16toUTF8(aName).get();
   const char* features = aFeatures.IsVoid() ? nullptr : aFeatures.get();
 
-  *aResult = pwwatch->OpenWindow2(parent, uri, name, features, aCalledFromJS,
+  *aResult = pwwatch->OpenWindow2(parent, uri,
+                                  aName.IsVoid() ?
+                                    nullptr :
+                                    NS_ConvertUTF16toUTF8(aName).get(),
+                                  features, aCalledFromJS,
                                   false, false, thisTabParent, nullptr,
                                   aFullZoom, 1, getter_AddRefs(window));
 
   if (NS_WARN_IF(!window)) {
     return true;
   }
 
   *aResult = NS_ERROR_FAILURE;