Fix outdated comment explaining XPCWrappedNative tearoff lifetime. No bug. r=mccr8

Differential Revision: https://phabricator.services.mozilla.com/D28216

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-04-19 17:18:41 +00:00
parent 5e55c84124
commit 89a288dda5

View File

@ -3127,7 +3127,8 @@ bool XPCJSRuntime::NoteCustomGCThingXPCOMChildren(
// A tearoff holds a strong reference to its native object
// (see XPCWrappedNative::FlatJSObjectFinalized). Its XPCWrappedNative
// will be held alive through the parent of the JSObject of the tearoff.
// will be held alive through tearoff's XPC_WN_TEAROFF_FLAT_OBJECT_SLOT,
// which points to the XPCWrappedNative's mFlatJSObject.
XPCWrappedNativeTearOff* to =
static_cast<XPCWrappedNativeTearOff*>(xpc_GetJSPrivate(obj));
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "xpc_GetJSPrivate(obj)->mNative");