mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 823902 - Use a bit less fromMarkedLocation; r=terrence
This commit is contained in:
parent
ab5d2d87e3
commit
5dd9979a30
@ -24,6 +24,7 @@ using js::frontend::IsIdentifier;
|
||||
using mozilla::ArrayLength;
|
||||
|
||||
|
||||
// Duplicated in jsobj.cpp
|
||||
static bool
|
||||
DefineProperties(JSContext *cx, HandleObject obj, HandleObject props)
|
||||
{
|
||||
@ -34,7 +35,7 @@ DefineProperties(JSContext *cx, HandleObject obj, HandleObject props)
|
||||
|
||||
bool dummy;
|
||||
for (size_t i = 0, len = ids.length(); i < len; i++) {
|
||||
if (!DefineProperty(cx, obj, Handle<jsid>::fromMarkedLocation(&ids[i]), descs[i], true, &dummy))
|
||||
if (!DefineProperty(cx, obj, ids.handleAt(i), descs[i], true, &dummy))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1013,6 +1013,7 @@ js::ReadPropertyDescriptors(JSContext *cx, HandleObject props, bool checkAccesso
|
||||
return true;
|
||||
}
|
||||
|
||||
// Duplicated in Object.cpp
|
||||
static bool
|
||||
DefineProperties(JSContext *cx, HandleObject obj, HandleObject props)
|
||||
{
|
||||
@ -1023,7 +1024,7 @@ DefineProperties(JSContext *cx, HandleObject obj, HandleObject props)
|
||||
|
||||
bool dummy;
|
||||
for (size_t i = 0, len = ids.length(); i < len; i++) {
|
||||
if (!DefineProperty(cx, obj, Handle<jsid>::fromMarkedLocation(&ids[i]), descs[i], true, &dummy))
|
||||
if (!DefineProperty(cx, obj, ids.handleAt(i), descs[i], true, &dummy))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2555,8 +2555,7 @@ Debugger::findScripts(JSContext *cx, unsigned argc, Value *vp)
|
||||
result->ensureDenseInitializedLength(cx, 0, scripts.length());
|
||||
|
||||
for (size_t i = 0; i < scripts.length(); i++) {
|
||||
JSObject *scriptObject =
|
||||
dbg->wrapScript(cx, Handle<JSScript*>::fromMarkedLocation(&scripts[i]));
|
||||
JSObject *scriptObject = dbg->wrapScript(cx, scripts.handleAt(i));
|
||||
if (!scriptObject)
|
||||
return false;
|
||||
result->setDenseElement(i, ObjectValue(*scriptObject));
|
||||
@ -3755,9 +3754,8 @@ DebuggerGenericEval(JSContext *cx, const char *fullMethodName,
|
||||
return false;
|
||||
}
|
||||
for (size_t i = 0; i < keys.length(); i++) {
|
||||
HandleId keyp = HandleId::fromMarkedLocation(&keys[i]);
|
||||
MutableHandleValue valp = MutableHandleValue::fromMarkedLocation(&values[i]);
|
||||
if (!JSObject::getGeneric(cx, bindingsobj, bindingsobj, keyp, valp) ||
|
||||
MutableHandleValue valp = values.handleAt(i);
|
||||
if (!JSObject::getGeneric(cx, bindingsobj, bindingsobj, keys.handleAt(i), valp) ||
|
||||
!dbg->unwrapDebuggeeValue(cx, valp))
|
||||
{
|
||||
return false;
|
||||
@ -3795,7 +3793,7 @@ DebuggerGenericEval(JSContext *cx, const char *fullMethodName,
|
||||
RootedId id(cx);
|
||||
for (size_t i = 0; i < keys.length(); i++) {
|
||||
id = keys[i];
|
||||
MutableHandleValue val = MutableHandleValue::fromMarkedLocation(&values[i]);
|
||||
MutableHandleValue val = values.handleAt(i);
|
||||
if (!cx->compartment->wrap(cx, val.address()) ||
|
||||
!DefineNativeProperty(cx, env, id, val, NULL, NULL, 0, 0, 0))
|
||||
{
|
||||
@ -4313,7 +4311,7 @@ DebuggerObject_defineProperties(JSContext *cx, unsigned argc, Value *vp)
|
||||
ErrorCopier ec(ac, dbg->toJSObject());
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
bool dummy;
|
||||
if (!DefineProperty(cx, obj, Handle<jsid>::fromMarkedLocation(&rewrappedIds[i]),
|
||||
if (!DefineProperty(cx, obj, rewrappedIds.handleAt(i),
|
||||
rewrappedDescs[i], true, &dummy))
|
||||
{
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user