зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1572782 - Remove external references to js::FreeOp r=mccr8?
Replace external use of js::FreeOp with JSFreeOp. Differential Revision: https://phabricator.services.mozilla.com/D41411 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a00726d223
Коммит
4f45eff7cc
|
@ -1764,7 +1764,7 @@ def finalizeHook(descriptor, hookName, freeOp, obj):
|
|||
if descriptor.wrapperCache:
|
||||
finalize += "ClearWrapper(self, self, %s);\n" % obj
|
||||
if descriptor.isGlobal():
|
||||
finalize += "mozilla::dom::FinalizeGlobal(js::CastToJSFreeOp(%s), %s);\n" % (freeOp, obj)
|
||||
finalize += "mozilla::dom::FinalizeGlobal(%s, %s);\n" % (freeOp, obj)
|
||||
finalize += fill(
|
||||
"""
|
||||
if (size_t mallocBytes = BindingJSObjectMallocBytes(self)) {
|
||||
|
@ -1783,7 +1783,7 @@ class CGClassFinalizeHook(CGAbstractClassHook):
|
|||
A hook for finalize, used to release our native object.
|
||||
"""
|
||||
def __init__(self, descriptor):
|
||||
args = [Argument('js::FreeOp*', 'fop'), Argument('JSObject*', 'obj')]
|
||||
args = [Argument('JSFreeOp*', 'fop'), Argument('JSObject*', 'obj')]
|
||||
CGAbstractClassHook.__init__(self, descriptor, FINALIZE_HOOK_NAME,
|
||||
'void', args)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SimpleGlobalObject)
|
|||
NS_INTERFACE_MAP_ENTRY(nsIGlobalObject)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
static void SimpleGlobal_finalize(js::FreeOp* fop, JSObject* obj) {
|
||||
static void SimpleGlobal_finalize(JSFreeOp* fop, JSObject* obj) {
|
||||
SimpleGlobalObject* globalObject =
|
||||
static_cast<SimpleGlobalObject*>(JS_GetPrivate(obj));
|
||||
if (globalObject) {
|
||||
|
|
|
@ -36,8 +36,8 @@ bool XPC_WN_NewEnumerate(JSContext* cx, JS::HandleObject obj,
|
|||
bool XPC_WN_Helper_Resolve(JSContext* cx, JS::HandleObject obj, JS::HandleId id,
|
||||
bool* resolvedp);
|
||||
|
||||
void XPC_WN_Helper_Finalize(js::FreeOp* fop, JSObject* obj);
|
||||
void XPC_WN_NoHelper_Finalize(js::FreeOp* fop, JSObject* obj);
|
||||
void XPC_WN_Helper_Finalize(JSFreeOp* fop, JSObject* obj);
|
||||
void XPC_WN_NoHelper_Finalize(JSFreeOp* fop, JSObject* obj);
|
||||
|
||||
bool XPC_WN_Helper_Call(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
|
|
|
@ -411,7 +411,7 @@ static bool SandboxCloneInto(JSContext* cx, unsigned argc, Value* vp) {
|
|||
return xpc::CloneInto(cx, args[0], args[1], options, args.rval());
|
||||
}
|
||||
|
||||
static void sandbox_finalize(js::FreeOp* fop, JSObject* obj) {
|
||||
static void sandbox_finalize(JSFreeOp* fop, JSObject* obj) {
|
||||
nsIScriptObjectPrincipal* sop =
|
||||
static_cast<nsIScriptObjectPrincipal*>(xpc_GetJSPrivate(obj));
|
||||
if (!sop) {
|
||||
|
|
|
@ -563,7 +563,7 @@ bool XPC_WN_Shared_Enumerate(JSContext* cx, HandleObject obj) {
|
|||
|
||||
enum WNHelperType { WN_NOHELPER, WN_HELPER };
|
||||
|
||||
static void WrappedNativeFinalize(js::FreeOp* fop, JSObject* obj,
|
||||
static void WrappedNativeFinalize(JSFreeOp* fop, JSObject* obj,
|
||||
WNHelperType helperType) {
|
||||
const js::Class* clazz = js::GetObjectClass(obj);
|
||||
if (clazz->flags & JSCLASS_DOM_GLOBAL) {
|
||||
|
@ -576,7 +576,7 @@ static void WrappedNativeFinalize(js::FreeOp* fop, JSObject* obj,
|
|||
|
||||
XPCWrappedNative* wrapper = static_cast<XPCWrappedNative*>(p);
|
||||
if (helperType == WN_HELPER) {
|
||||
wrapper->GetScriptable()->Finalize(wrapper, js::CastToJSFreeOp(fop), obj);
|
||||
wrapper->GetScriptable()->Finalize(wrapper, fop, obj);
|
||||
}
|
||||
wrapper->FlatJSObjectFinalized();
|
||||
}
|
||||
|
@ -592,7 +592,7 @@ static size_t WrappedNativeObjectMoved(JSObject* obj, JSObject* old) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void XPC_WN_NoHelper_Finalize(js::FreeOp* fop, JSObject* obj) {
|
||||
void XPC_WN_NoHelper_Finalize(JSFreeOp* fop, JSObject* obj) {
|
||||
WrappedNativeFinalize(fop, obj, WN_NOHELPER);
|
||||
}
|
||||
|
||||
|
@ -759,7 +759,7 @@ bool XPC_WN_Helper_HasInstance(JSContext* cx, HandleObject obj,
|
|||
POST_HELPER_STUB
|
||||
}
|
||||
|
||||
void XPC_WN_Helper_Finalize(js::FreeOp* fop, JSObject* obj) {
|
||||
void XPC_WN_Helper_Finalize(JSFreeOp* fop, JSObject* obj) {
|
||||
WrappedNativeFinalize(fop, obj, WN_HELPER);
|
||||
}
|
||||
|
||||
|
@ -1019,7 +1019,7 @@ static bool XPC_WN_Proto_Enumerate(JSContext* cx, HandleObject obj) {
|
|||
return true;
|
||||
}
|
||||
|
||||
static void XPC_WN_Proto_Finalize(js::FreeOp* fop, JSObject* obj) {
|
||||
static void XPC_WN_Proto_Finalize(JSFreeOp* fop, JSObject* obj) {
|
||||
// This can be null if xpc shutdown has already happened
|
||||
XPCWrappedNativeProto* p = (XPCWrappedNativeProto*)xpc_GetJSPrivate(obj);
|
||||
if (p) {
|
||||
|
@ -1151,7 +1151,7 @@ static bool XPC_WN_TearOff_Resolve(JSContext* cx, HandleObject obj, HandleId id,
|
|||
resolvedp);
|
||||
}
|
||||
|
||||
static void XPC_WN_TearOff_Finalize(js::FreeOp* fop, JSObject* obj) {
|
||||
static void XPC_WN_TearOff_Finalize(JSFreeOp* fop, JSObject* obj) {
|
||||
XPCWrappedNativeTearOff* p = (XPCWrappedNativeTearOff*)xpc_GetJSPrivate(obj);
|
||||
if (!p) {
|
||||
return;
|
||||
|
|
|
@ -63,7 +63,7 @@ bool XPCWrappedNativeProto::Init(JSContext* cx, nsIXPCScriptable* scriptable) {
|
|||
return success;
|
||||
}
|
||||
|
||||
void XPCWrappedNativeProto::JSProtoObjectFinalized(js::FreeOp* fop,
|
||||
void XPCWrappedNativeProto::JSProtoObjectFinalized(JSFreeOp* fop,
|
||||
JSObject* obj) {
|
||||
MOZ_ASSERT(obj == mJSProtoObject, "huh?");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче