mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
[SM91] Update to Spidermonkey 91.1.3 APIs
Fixes: #5986 Patch by: @wraitii Comments by: @nwtour, @Stan Differential Revision: https://code.wildfiregames.com/D4428 This was SVN commit r27409.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2023 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -170,13 +170,13 @@ protected:
|
||||
|
||||
// The JS code will see undefined when querying a property descriptor.
|
||||
virtual bool getOwnPropertyDescriptor(JSContext* UNUSED(cx), JS::HandleObject UNUSED(proxy), JS::HandleId UNUSED(id),
|
||||
JS::MutableHandle<JS::PropertyDescriptor> UNUSED(desc)) const override
|
||||
JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>> UNUSED(desc)) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// Throw an exception is JS code attempts defining a property.
|
||||
virtual bool defineProperty(JSContext* UNUSED(cx), JS::HandleObject UNUSED(proxy), JS::HandleId UNUSED(id),
|
||||
JS::Handle<JS::PropertyDescriptor> UNUSED(desc), JS::ObjectOpResult& UNUSED(result)) const override
|
||||
JS::Handle<JS::PropertyDescriptor> UNUSED(desc), JS::ObjectOpResult& UNUSED(result)) const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2023 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -89,7 +89,7 @@ IGUIObject* IGUIProxyObject::FromPrivateSlot<IGUIObject>(JSObject* obj)
|
||||
{
|
||||
if (!obj)
|
||||
return nullptr;
|
||||
if (JS_GetClass(obj) != &JSInterface_GUIProxy::ClassDefinition())
|
||||
if (JS::GetClass(obj) != &JSInterface_GUIProxy::ClassDefinition())
|
||||
return nullptr;
|
||||
return UnsafeFromPrivateSlot<IGUIObject>(obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user