Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- virtual void SetPrivateData(JSContext* cx) {
- ENSURE(m_JSObject.initialized());
- JS::RootedObject ptrObj(cx, JS_NewObject(cx, &IGUIObject::store_class));
- JS_SetPrivate(ptrObj, (void*) this);
- JS::RootedValue ptrVal(cx);
- ptrVal.setObject(*ptrObj);
- /** I'm not entirely sure this static cast is needed but it seems conceptually correct, and safer */
- js::SetProxyReservedSlot(m_JSObject.get(), 0, ptrVal);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement