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 250209 a5cd9f18f1b6173844f26da8780635c1683f80c4
parent 250208 efe7247291788d38440ca378ff148131e15b0314
child 250210 a4bcc7ee6e5c0582ec95b5caf34ecb46dcf37bda
push id61478
push usernsm.nikhil@gmail.com
push dateThu, 25 Jun 2015 18:46:25 +0000
treeherdermozilla-inbound@a5cd9f18f1b6 [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();
 }