mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-13 15:34:37 +00:00
SpiderMonkey 38 upgrade: 09/35
Use .toFoo() instead of JSVAL_TO_FOO. Patch by leper. Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=952650 This was SVN commit r18663.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "ps/CLogger.h"
|
||||
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptExtraHeaders.h"
|
||||
|
||||
JSClass JSI_IGUIObject::JSI_class = {
|
||||
"GUIObject", JSCLASS_HAS_PRIVATE,
|
||||
@@ -612,7 +613,7 @@ bool JSI_IGUIObject::construct(JSContext* cx, uint argc, jsval* vp)
|
||||
JS::RootedObject obj(cx, pScriptInterface->CreateCustomObject("GUIObject"));
|
||||
|
||||
// Store the IGUIObject in the JS object's 'private' area
|
||||
IGUIObject* guiObject = (IGUIObject*)JSVAL_TO_PRIVATE(args[0]);
|
||||
IGUIObject* guiObject = (IGUIObject*)args[0].get().toPrivate();
|
||||
JS_SetPrivate(obj, guiObject);
|
||||
|
||||
args.rval().setObject(*obj);
|
||||
|
||||
Reference in New Issue
Block a user