Bug 1260417 - Part a: Add a comment about the compartment of CallbackObject::mCallback; r=bz

This commit is contained in:
Ms2ger 2016-04-07 09:11:52 +02:00
Родитель 8cf134c70f
Коммит c005f7ce82
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -193,6 +193,10 @@ protected:
}
}
// mCallback is not unwrapped, so it can be a cross-compartment-wrapper.
// This is done to ensure that, if JS code can't call a callback f(), or get
// its members, directly itself, this code won't call f(), or get its members,
// on the code's behalf.
JS::Heap<JSObject*> mCallback;
JS::Heap<JSObject*> mCreationStack;
// Ideally, we'd just hold a reference to the nsIGlobalObject, since that's