Bug 1113369, part 5 - [[Delete]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect.
This commit is contained in:
@@ -738,8 +738,8 @@ DefinePropertyOnObject(JSContext *cx, HandleNativeObject obj, HandleId id, const
|
||||
* redefining it or we had invoked its setter to change its value).
|
||||
*/
|
||||
if (callDelProperty) {
|
||||
bool ignored;
|
||||
if (!CallJSDeletePropertyOp(cx, obj->getClass()->delProperty, obj, id, &ignored))
|
||||
ObjectOpResult ignored;
|
||||
if (!CallJSDeletePropertyOp(cx, obj->getClass()->delProperty, obj, id, ignored))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2571,9 +2571,11 @@ DefineConstructorAndPrototype(JSContext *cx, HandleObject obj, JSProtoKey key, H
|
||||
|
||||
bad:
|
||||
if (named) {
|
||||
bool succeeded;
|
||||
ObjectOpResult ignored;
|
||||
RootedId id(cx, AtomToId(atom));
|
||||
DeleteProperty(cx, obj, id, &succeeded);
|
||||
|
||||
// XXX FIXME - absurd to call this here; instead define the property last.
|
||||
DeleteProperty(cx, obj, id, ignored);
|
||||
}
|
||||
if (cached)
|
||||
ClearClassObject(obj, key);
|
||||
|
||||
Reference in New Issue
Block a user