JSBool JavaObject::getPropertyWrapper(JSContext* ctx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::MutableHandle<JS::Value> vp) { jsval rval; JSBool result = JavaObject::getProperty(ctx, obj.get(), id.get(), &rval); vp.set(rval); return result; }
js::GetObjectProto(JSContext *cx, JS::Handle<JSObject*> obj, JS::MutableHandle<JSObject*> proto) { if (IsProxy(obj)) return JS_GetPrototype(cx, obj, proto); proto.set(reinterpret_cast<const shadow::Object*>(obj.get())->type->proto); return true; }
bool JSCompartment::addToVarNames(JSContext* cx, JS::Handle<JSAtom*> name) { if (varNames_.put(name.get())) return true; ReportOutOfMemory(cx); return false; }
js::GetObjectProto(JSContext *cx, JS::Handle<JSObject*> obj, JS::MutableHandle<JSObject*> proto) { js::Class *clasp = GetObjectClass(obj); if (clasp == js::ObjectProxyClassPtr || clasp == js::OuterWindowProxyClassPtr || clasp == js::FunctionProxyClassPtr) { return JS_GetPrototype(cx, obj, proto); } proto.set(reinterpret_cast<const shadow::Object*>(obj.get())->type->proto); return true; }