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.
This commit is contained in:
Itms
2016-09-02 16:44:33 +00:00
parent 99534a15f1
commit 58cace1156
+3 -2
View File
@@ -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<const char16_t*>(name16.c_str()), name16.length(), value, NULL, NULL, attrs))
if (!JS_DefineUCProperty(m->m_cx, object, reinterpret_cast<const char16_t*>(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;
}