Bug 828462 - Root Proxy/Wrapper in the browser. r=terrence,bz

This commit is contained in:
Tom Schuster
2013-03-21 23:23:48 +01:00
parent 09fadd329b
commit a2f87bfeac
15 changed files with 284 additions and 224 deletions

View File

@@ -76,7 +76,7 @@ DOMProxyHandler::EnsureExpandoObject(JSContext* cx, JSObject* obj)
}
bool
DOMProxyHandler::getPropertyDescriptor(JSContext* cx, JS::Handle<JSObject *> proxy, JS::Handle<jsid> id,
DOMProxyHandler::getPropertyDescriptor(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id,
JSPropertyDescriptor* desc, unsigned flags)
{
if (!getOwnPropertyDescriptor(cx, proxy, id, desc, flags)) {
@@ -99,7 +99,7 @@ DOMProxyHandler::getPropertyDescriptor(JSContext* cx, JS::Handle<JSObject *> pro
}
bool
DOMProxyHandler::defineProperty(JSContext* cx, JS::Handle<JSObject *> proxy, JS::Handle<jsid> id,
DOMProxyHandler::defineProperty(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id,
JSPropertyDescriptor* desc)
{
if ((desc->attrs & JSPROP_GETTER) && desc->setter == JS_StrictPropertyStub) {
@@ -124,7 +124,7 @@ DOMProxyHandler::defineProperty(JSContext* cx, JS::Handle<JSObject *> proxy, JS:
}
bool
DOMProxyHandler::delete_(JSContext* cx, JS::Handle<JSObject *> proxy,
DOMProxyHandler::delete_(JSContext* cx, JS::Handle<JSObject*> proxy,
JS::Handle<jsid> id, bool* bp)
{
JSBool b = true;
@@ -142,10 +142,8 @@ DOMProxyHandler::delete_(JSContext* cx, JS::Handle<JSObject *> proxy,
}
bool
DOMProxyHandler::enumerate(JSContext* cx, JSObject* proxy_, AutoIdVector& props)
DOMProxyHandler::enumerate(JSContext* cx, JS::Handle<JSObject*> proxy, AutoIdVector& props)
{
JS::Rooted<JSObject *> proxy(cx, proxy_);
JSObject* proto;
if (!JS_GetPrototype(cx, proxy, &proto)) {
return false;
@@ -155,14 +153,7 @@ DOMProxyHandler::enumerate(JSContext* cx, JSObject* proxy_, AutoIdVector& props)
}
bool
DOMProxyHandler::fix(JSContext* cx, JSObject* proxy, Value* vp)
{
vp->setUndefined();
return true;
}
bool
DOMProxyHandler::has(JSContext* cx, JSObject* proxy, jsid id, bool* bp)
DOMProxyHandler::has(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, bool* bp)
{
if (!hasOwn(cx, proxy, id, bp)) {
return false;