Bug 1169044 - Patch 7 - Set mObserver in URLSearchParams. a=bustage.
authorNikhil Marathe <nsm.nikhil@gmail.com>
Thu, 25 Jun 2015 11:44:34 -0700
changeset 250259 a5cd9f18f1b6173844f26da8780635c1683f80c4
parent 250258 efe7247291788d38440ca378ff148131e15b0314
child 250260 a4bcc7ee6e5c0582ec95b5caf34ecb46dcf37bda
push id28951
push usercbook@mozilla.com
push dateFri, 26 Jun 2015 11:19:38 +0000
treeherdermozilla-central@56e207dbb3bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1169044
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1169044 - Patch 7 - Set mObserver in URLSearchParams. a=bustage. A patch was landed on inbound that changed URLSearchParams to have multiple observers then got backed out, which broke this.
dom/base/URLSearchParams.cpp
--- a/dom/base/URLSearchParams.cpp
+++ b/dom/base/URLSearchParams.cpp
@@ -298,22 +298,22 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(URLSearc
 NS_IMPL_CYCLE_COLLECTING_RELEASE(URLSearchParams)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(URLSearchParams)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 URLSearchParams::URLSearchParams(URLSearchParamsObserver* aObserver)
-  : mParams(new URLParams())
+  : mParams(new URLParams()), mObserver(aObserver)
 {
 }
 
 URLSearchParams::URLSearchParams(const URLSearchParams& aOther)
-  : mParams(new URLParams(*aOther.mParams.get()))
+  : mParams(new URLParams(*aOther.mParams.get())), mObserver(aOther.mObserver)
 {
 }
 
 URLSearchParams::~URLSearchParams()
 {
   DeleteAll();
 }