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:
Itms
2016-09-02 16:23:44 +00:00
parent 1223efcef8
commit c7c3ef9f92
4 changed files with 13 additions and 11 deletions
@@ -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);