mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-24 17:46:03 +00:00
SpiderMonkey 38 upgrade: 14/35
JS_NewObject has no parent or proto arg anymore, use JS_NewObjectWithGivenProto instead. Patch by leper. Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1136906 https://bugzilla.mozilla.org/show_bug.cgi?id=1127443 and https://bugzilla.mozilla.org/show_bug.cgi?id=1136345 This was SVN commit r18668.
This commit is contained in:
@@ -182,7 +182,7 @@ template<> void ScriptInterface::ToJSVal<CFixedVector3D>(JSContext* cx, JS::Muta
|
||||
// apply the Vector3D prototype to the return value;
|
||||
ScriptInterface::CxPrivate* pCxPrivate = ScriptInterface::GetScriptInterfaceAndCBData(cx);
|
||||
JS::RootedObject proto(cx, &pCxPrivate->pScriptInterface->GetCachedValue(ScriptInterface::CACHE_VECTOR3DPROTO).toObject());
|
||||
JS::RootedObject obj(cx, JS_NewObject(cx, nullptr, proto, JS::NullPtr()));
|
||||
JS::RootedObject obj(cx, JS_NewObjectWithGivenProto(cx, nullptr, proto));
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
@@ -229,7 +229,7 @@ template<> void ScriptInterface::ToJSVal<CFixedVector2D>(JSContext* cx, JS::Muta
|
||||
// apply the Vector2D prototype to the return value
|
||||
ScriptInterface::CxPrivate* pCxPrivate = ScriptInterface::GetScriptInterfaceAndCBData(cx);
|
||||
JS::RootedObject proto(cx, &pCxPrivate->pScriptInterface->GetCachedValue(ScriptInterface::CACHE_VECTOR2DPROTO).toObject());
|
||||
JS::RootedObject obj(cx, JS_NewObject(cx, nullptr, proto, JS::NullPtr()));
|
||||
JS::RootedObject obj(cx, JS_NewObjectWithGivenProto(cx, nullptr, proto));
|
||||
if (!obj)
|
||||
{
|
||||
ret.setUndefined();
|
||||
|
||||
Reference in New Issue
Block a user