mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 20:43:53 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user