зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1703108 - Don't clear tracing context until after it has been used r=mccr8
This tracing context information is used for CC logging. Don't clear it until after it's been used. Differential Revision: https://phabricator.services.mozilla.com/D110900
This commit is contained in:
Родитель
d17d89a150
Коммит
0df0e68efa
|
@ -396,9 +396,6 @@ struct TraversalTracer : public JS::CallbackTracer {
|
|||
};
|
||||
|
||||
void TraversalTracer::onChild(const JS::GCCellPtr& aThing) {
|
||||
// Allow re-use of this tracer inside trace callback.
|
||||
JS::AutoClearTracingContext actc(this);
|
||||
|
||||
// Checking strings and symbols for being gray is rather slow, and we don't
|
||||
// need either of them for the cycle collector.
|
||||
if (aThing.is<JSString>() || aThing.is<JS::Symbol>()) {
|
||||
|
@ -424,7 +421,13 @@ void TraversalTracer::onChild(const JS::GCCellPtr& aThing) {
|
|||
mCb.NoteNextEdgeName(buffer);
|
||||
}
|
||||
mCb.NoteJSChild(aThing);
|
||||
} else if (aThing.is<js::Shape>()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Allow re-use of this tracer inside trace callback.
|
||||
JS::AutoClearTracingContext actc(this);
|
||||
|
||||
if (aThing.is<js::Shape>()) {
|
||||
// The maximum depth of traversal when tracing a Shape is unbounded, due to
|
||||
// the parent pointers on the shape.
|
||||
JS_TraceShapeCycleCollectorChildren(this, aThing);
|
||||
|
|
Загрузка…
Ссылка в новой задаче