1320408 - Part 22: Remove JSContext* parameter from ProxyObject::renew and Wrapper::Renew.

This commit is contained in:
Gaming4JC 2019-06-09 00:39:54 -04:00 • committed by Roy Tam
commit 317605333c
6 changed files with 7 additions and 7 deletions

View file

@ -988,7 +988,7 @@ Wrap(JSContext *cx, JS::HandleObject existing, JS::HandleObject obj)
}
if (existing) {
js::Wrapper::Renew(cx, existing, obj, wrapper);
js::Wrapper::Renew(existing, obj, wrapper);
}
return js::Wrapper::New(cx, obj, wrapper);
}

View file

@ -136,7 +136,7 @@ class JS_FRIEND_API(Wrapper) : public BaseProxyHandler
static JSObject* New(JSContext* cx, JSObject* obj, const Wrapper* handler,
const WrapperOptions& options = WrapperOptions());
static JSObject* Renew(JSContext* cx, JSObject* existing, JSObject* obj, const Wrapper* handler);
static JSObject* Renew(JSObject* existing, JSObject* obj, const Wrapper* handler);
static const Wrapper* wrapperHandler(JSObject* wrapper);

View file

@ -774,7 +774,7 @@ js::NewProxyObject(JSContext* cx, const BaseProxyHandler* handler, HandleValue p
}
void
ProxyObject::renew(JSContext* cx, const BaseProxyHandler* handler, const Value& priv)
ProxyObject::renew(const BaseProxyHandler* handler, const Value& priv)
{
MOZ_ASSERT(!IsInsideNursery(this));
MOZ_ASSERT_IF(IsCrossCompartmentWrapper(this), IsDeadProxyObject(this));

View file

@ -312,9 +312,9 @@ Wrapper::New(JSContext* cx, JSObject* obj, const Wrapper* handler,
}
JSObject*
Wrapper::Renew(JSContext* cx, JSObject* existing, JSObject* obj, const Wrapper* handler)
Wrapper::Renew(JSObject* existing, JSObject* obj, const Wrapper* handler)
{
existing->as<ProxyObject>().renew(cx, handler, ObjectValue(*obj));
existing->as<ProxyObject>().renew(handler, ObjectValue(*obj));
return existing;
}

View file

@ -104,7 +104,7 @@ class ProxyObject : public ShapedObject
public:
static unsigned grayLinkExtraSlot(JSObject* obj);
void renew(JSContext* cx, const BaseProxyHandler* handler, const Value& priv);
void renew(const BaseProxyHandler* handler, const Value& priv);
static void trace(JSTracer* trc, JSObject* obj);

View file

@ -536,7 +536,7 @@ WrapperFactory::Rewrap(JSContext* cx, HandleObject existing, HandleObject obj)
DEBUG_CheckUnwrapSafety(obj, wrapper, origin, target);
if (existing)
return Wrapper::Renew(cx, existing, obj, wrapper);
return Wrapper::Renew(existing, obj, wrapper);
return Wrapper::New(cx, obj, wrapper);
}