зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1557928 - Use the UnmarkGray tracekind for AssertNonGrayTracer r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D34673 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3aa08f8bc8
Коммит
109fd59d37
|
@ -3504,6 +3504,10 @@ struct AssertNonGrayTracer final : public JS::CallbackTracer {
|
|||
void onChild(const JS::GCCellPtr& thing) override {
|
||||
MOZ_ASSERT(!thing.asCell()->isMarkedGray());
|
||||
}
|
||||
// This is used by the UnmarkGray tracer only, and needs to report itself
|
||||
// as the non-gray tracer to not trigger assertions. Do not use it in another
|
||||
// context without making this more generic.
|
||||
TracerKind getTracerKind() const override { return TracerKind::UnmarkGray; }
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
var g = newGlobal({ newCompartment: true });
|
||||
var dbg = new Debugger;
|
||||
var gw = dbg.addDebuggee(g);
|
||||
lfOffThreadGlobal = g;
|
||||
lfOffThreadGlobal.offThreadCompileScript(`
|
||||
grayRoot()[0] = "foo";
|
||||
`);
|
||||
lfOffThreadGlobal.runOffThreadScript();
|
||||
var g = newGlobal({newCompartment: true});
|
||||
var gw = dbg.addDebuggee(g);
|
||||
lfOffThreadGlobal = null;
|
||||
gc();
|
||||
schedulegc(this);
|
||||
schedulegc('atoms');
|
||||
gc('zone');
|
||||
|
Загрузка…
Ссылка в новой задаче