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:
Jason Orendorff
2015-02-04 10:20:04 -06:00
parent b180889659
commit 20beb2cc48
60 changed files with 372 additions and 303 deletions

View File

@@ -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);