зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1425450 - Supress rooting analysis warning when removing a JS holder r=mccr8
Currently we get a rooting hazard when nsWrapperCache::UpdateWrapperForNewGlobal calls ReleaseWrapper because the analysis can't see through the virtual method call. Differential Revision: https://phabricator.services.mozilla.com/D71600
This commit is contained in:
Родитель
ca427d70af
Коммит
ec43abf814
|
@ -1293,6 +1293,9 @@ struct ClearJSHolder : public TraceCallbacks {
|
|||
void CycleCollectedJSRuntime::RemoveJSHolder(void* aHolder) {
|
||||
nsScriptObjectTracer* tracer = mJSHolders.GetAndRemove(aHolder);
|
||||
if (tracer) {
|
||||
// Bug 1531951: The analysis can't see through the virtual call but we know
|
||||
// that the ClearJSHolder tracer will never GC.
|
||||
JS::AutoSuppressGCAnalysis nogc;
|
||||
tracer->Trace(aHolder, ClearJSHolder(), nullptr);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче