From 58cace1156c48ee034037a060f1d70db13dc975f Mon Sep 17 00:00:00 2001 From: Itms Date: Fri, 2 Sep 2016 16:44:33 +0000 Subject: [PATCH] SpiderMonkey 38 upgrade: 26/35 JS_Define{,UC}Property{,ById} has the attrs parameter moved in front of the getter and setter params. Patch by leper. Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=959787 https://bugzilla.mozilla.org/show_bug.cgi?id=1088002 and https://bugzilla.mozilla.org/show_bug.cgi?id=1211607 This was SVN commit r18680. --- source/scriptinterface/ScriptInterface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/scriptinterface/ScriptInterface.cpp b/source/scriptinterface/ScriptInterface.cpp index c780bcbf86..eba31592a3 100644 --- a/source/scriptinterface/ScriptInterface.cpp +++ b/source/scriptinterface/ScriptInterface.cpp @@ -663,7 +663,7 @@ bool ScriptInterface::SetProperty_(JS::HandleValue obj, const wchar_t* name, JS: JS::RootedObject object(m->m_cx, &obj.toObject()); utf16string name16(name, name + wcslen(name)); - if (!JS_DefineUCProperty(m->m_cx, object, reinterpret_cast(name16.c_str()), name16.length(), value, NULL, NULL, attrs)) + if (!JS_DefineUCProperty(m->m_cx, object, reinterpret_cast(name16.c_str()), name16.length(), value, attrs)) return false; return true; } @@ -681,7 +681,8 @@ bool ScriptInterface::SetPropertyInt_(JS::HandleValue obj, int name, JS::HandleV return false; JS::RootedObject object(m->m_cx, &obj.toObject()); - if (!JS_DefinePropertyById(m->m_cx, object, INT_TO_JSID(name), value, NULL, NULL, attrs)) + JS::RootedId id(m->m_cx, INT_TO_JSID(name)); + if (!JS_DefinePropertyById(m->m_cx, object, id, value, attrs)) return false; return true; }