mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 828293 - Root js_NativeSet's vp argument; r=terrence
This commit is contained in:
parent
549bbd5a67
commit
c6d60263ed
@ -348,7 +348,7 @@ SetPropertyOperation(JSContext *cx, jsbytecode *pc, HandleValue lval, HandleValu
|
||||
} else {
|
||||
RootedValue rref(cx, rval);
|
||||
bool strict = cx->stack.currentScript()->strict;
|
||||
if (!js_NativeSet(cx, obj, obj, shape, false, strict, rref.address()))
|
||||
if (!js_NativeSet(cx, obj, obj, shape, false, strict, &rref))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -3276,17 +3276,17 @@ js_NativeGet(JSContext *cx, Handle<JSObject*> obj, Handle<JSObject*> pobj, Handl
|
||||
|
||||
JSBool
|
||||
js_NativeSet(JSContext *cx, Handle<JSObject*> obj, Handle<JSObject*> receiver,
|
||||
HandleShape shape, bool added, bool strict, Value *vp)
|
||||
HandleShape shape, bool added, bool strict, MutableHandleValue vp)
|
||||
{
|
||||
JS_ASSERT(obj->isNative());
|
||||
|
||||
if (shape->hasSlot()) {
|
||||
uint32_t slot = shape->slot();
|
||||
|
||||
/* If shape has a stub setter, just store *vp. */
|
||||
/* If shape has a stub setter, just store vp. */
|
||||
if (shape->hasDefaultSetter()) {
|
||||
AddTypePropertyId(cx, obj, shape->propid(), *vp);
|
||||
obj->nativeSetSlot(slot, *vp);
|
||||
AddTypePropertyId(cx, obj, shape->propid(), vp);
|
||||
obj->nativeSetSlot(slot, vp);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
@ -3300,10 +3300,10 @@ js_NativeSet(JSContext *cx, Handle<JSObject*> obj, Handle<JSObject*> receiver,
|
||||
return js_ReportGetterOnlyAssignment(cx);
|
||||
}
|
||||
|
||||
RootedValue nvp(cx, *vp);
|
||||
RootedValue ovp(cx, vp);
|
||||
|
||||
uint32_t sample = cx->runtime->propertyRemovals;
|
||||
if (!shape->set(cx, obj, receiver, strict, &nvp))
|
||||
if (!shape->set(cx, obj, receiver, strict, vp))
|
||||
return false;
|
||||
|
||||
/*
|
||||
@ -3312,12 +3312,12 @@ js_NativeSet(JSContext *cx, Handle<JSObject*> obj, Handle<JSObject*> receiver,
|
||||
*/
|
||||
if (shape->hasSlot() &&
|
||||
(JS_LIKELY(cx->runtime->propertyRemovals == sample) ||
|
||||
obj->nativeContains(cx, shape))) {
|
||||
AddTypePropertyId(cx, obj, shape->propid(), *vp);
|
||||
obj->setSlot(shape->slot(), nvp);
|
||||
obj->nativeContains(cx, shape)))
|
||||
{
|
||||
AddTypePropertyId(cx, obj, shape->propid(), ovp);
|
||||
obj->setSlot(shape->slot(), vp);
|
||||
}
|
||||
|
||||
*vp = nvp;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -3764,7 +3764,7 @@ baseops::SetPropertyHelper(JSContext *cx, HandleObject obj, HandleObject receive
|
||||
if ((defineHow & DNP_CACHE_RESULT) && !added)
|
||||
cx->propertyCache().fill(cx, obj, obj, shape);
|
||||
|
||||
return js_NativeSet(cx, obj, receiver, shape, added, strict, vp.address());
|
||||
return js_NativeSet(cx, obj, receiver, shape, added, strict, vp);
|
||||
}
|
||||
|
||||
JSBool
|
||||
|
@ -1294,7 +1294,7 @@ js_NativeGet(JSContext *cx, js::Handle<JSObject*> obj, js::Handle<JSObject*> pob
|
||||
|
||||
extern JSBool
|
||||
js_NativeSet(JSContext *cx, js::Handle<JSObject*> obj, js::Handle<JSObject*> receiver,
|
||||
js::Handle<js::Shape*> shape, bool added, bool strict, js::Value *vp);
|
||||
js::Handle<js::Shape*> shape, bool added, bool strict, js::MutableHandleValue vp);
|
||||
|
||||
namespace js {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user