mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1128648 - Remove fretting about DynamicWithObject in Shape::set. r=efaust.
--HG-- extra : rebase_source : fc663cf11ee408207a25003db973364ad104c8df
This commit is contained in:
parent
e5521cbf56
commit
49e80e2c34
@ -41,10 +41,11 @@ Shape::search(ExclusiveContext *cx, jsid id)
|
||||
}
|
||||
|
||||
inline bool
|
||||
Shape::set(JSContext* cx, HandleObject obj, HandleObject receiver, bool strict,
|
||||
Shape::set(JSContext* cx, HandleNativeObject obj, HandleObject receiver, bool strict,
|
||||
MutableHandleValue vp)
|
||||
{
|
||||
MOZ_ASSERT_IF(hasDefaultSetter(), hasGetterValue());
|
||||
MOZ_ASSERT(!obj->is<DynamicWithObject>()); // See bug 1128681.
|
||||
|
||||
if (attrs & JSPROP_SETTER) {
|
||||
Value fval = setterValue();
|
||||
@ -58,16 +59,6 @@ Shape::set(JSContext* cx, HandleObject obj, HandleObject receiver, bool strict,
|
||||
return true;
|
||||
|
||||
RootedId id(cx, propid());
|
||||
|
||||
/*
|
||||
* |with (it) color='red';| ends up here.
|
||||
* Avoid exposing the With object to native setters.
|
||||
*/
|
||||
if (obj->is<DynamicWithObject>()) {
|
||||
RootedObject nobj(cx, &obj->as<DynamicWithObject>().object());
|
||||
return CallJSPropertyOpSetter(cx, setterOp(), nobj, id, strict, vp);
|
||||
}
|
||||
|
||||
return CallJSPropertyOpSetter(cx, setterOp(), obj, id, strict, vp);
|
||||
}
|
||||
|
||||
|
@ -962,7 +962,8 @@ class Shape : public gc::TenuredCell
|
||||
setter() == rawSetter;
|
||||
}
|
||||
|
||||
bool set(JSContext* cx, HandleObject obj, HandleObject receiver, bool strict, MutableHandleValue vp);
|
||||
bool set(JSContext* cx, HandleNativeObject obj, HandleObject receiver, bool strict,
|
||||
MutableHandleValue vp);
|
||||
|
||||
BaseShape *base() const { return base_.get(); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user