mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 807179 - Add a constructor for JSPropertyDescriptor. r=luke
This commit is contained in:
parent
68d4fa0e36
commit
327f8ca891
@ -4413,6 +4413,10 @@ struct JSPropertyDescriptor {
|
||||
JSPropertyOp getter;
|
||||
JSStrictPropertyOp setter;
|
||||
jsval value;
|
||||
|
||||
JSPropertyDescriptor() : obj(NULL), attrs(0), shortid(0), getter(NULL),
|
||||
setter(NULL), value(JSVAL_VOID)
|
||||
{}
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -414,7 +414,6 @@ ExposedPropertiesOnly::check(JSContext *cx, JSObject *wrapper, jsid id, Wrapper:
|
||||
Access access = NO_ACCESS;
|
||||
|
||||
JSPropertyDescriptor desc;
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
if (!JS_GetPropertyDescriptorById(cx, hallpass, id, JSRESOLVE_QUALIFIED, &desc)) {
|
||||
return false; // Error
|
||||
}
|
||||
|
@ -72,7 +72,6 @@ ChromeObjectWrapper::has(JSContext *cx, JSObject *wrapper, jsid id, bool *bp)
|
||||
// Try the prototype if that failed.
|
||||
MOZ_ASSERT(js::IsObjectInContextCompartment(wrapper, cx));
|
||||
JSPropertyDescriptor desc;
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
if (!JS_GetPropertyDescriptorById(cx, wrapperProto, id, 0, &desc))
|
||||
return false;
|
||||
*bp = !!desc.obj;
|
||||
@ -87,7 +86,6 @@ ChromeObjectWrapper::get(JSContext *cx, JSObject *wrapper, JSObject *receiver,
|
||||
// this because the call signature of ::get doesn't give us any way to
|
||||
// determine the object upon which the property was found.
|
||||
JSPropertyDescriptor desc;
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
if (!ChromeObjectWrapperBase::getPropertyDescriptor(cx, wrapper, id, false,
|
||||
&desc)) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user