Bug 1518787 - Fix RemoteOuterWindowProxy::getOwnPropertyDescriptor for indexed properties. r=bzbarsky
authorPeter Van der Beken <peterv@propagandism.org>
Wed, 09 Jan 2019 15:49:26 +0000
changeset 510169 20bb124acab30f5e69717c45dd15e116518de504
parent 510168 c429964db93ce00306562cc471453ce9adfcf0fb
child 510170 95324d36ded5b08991bd78245823931430066298
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1518787
milestone66.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 1518787 - Fix RemoteOuterWindowProxy::getOwnPropertyDescriptor for indexed properties. r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D16046
dom/base/RemoteOuterWindowProxy.cpp
--- a/dom/base/RemoteOuterWindowProxy.cpp
+++ b/dom/base/RemoteOuterWindowProxy.cpp
@@ -97,18 +97,18 @@ static BrowsingContext* GetBrowsingConte
 
 bool WrapResult(JSContext* aCx, JS::Handle<JSObject*> aProxy,
                 BrowsingContext* aResult, unsigned attrs,
                 JS::MutableHandle<JS::PropertyDescriptor> aDesc) {
   JS::Rooted<JS::Value> v(aCx);
   if (!ToJSValue(aCx, WindowProxyHolder(aResult), &v)) {
     return false;
   }
+  aDesc.setDataDescriptor(v, attrs);
   aDesc.object().set(aProxy);
-  aDesc.setDataDescriptor(v, attrs);
   return true;
 }
 
 bool RemoteOuterWindowProxy::getOwnPropertyDescriptor(
     JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<jsid> aId,
     JS::MutableHandle<JS::PropertyDescriptor> aDesc) const {
   BrowsingContext* bc = GetBrowsingContext(aProxy);
   uint32_t index = GetArrayIndexFromId(aId);