зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1592427: Don't use an AddPtr to access generatorFrames in Debugger::getFrame. r=loganfsmyth
Responsibility for creating entries in Debugger::generatorFrames was moved to DebuggerFrame::setGenerator, so Debugger::getFrame is only doing lookups now, and can use the more restricted `Ptr` type for the results of its lookups. Depends on D56836 Differential Revision: https://phabricator.services.mozilla.com/D56837 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a50662ee8f
Коммит
360e4601c1
|
@ -559,14 +559,13 @@ bool Debugger::getFrame(JSContext* cx, const FrameIter& iter,
|
|||
// was suspended, popping the stack frame, and later resumed (and we
|
||||
// were not stepping, so did not pass through slowPathOnResumeFrame).
|
||||
Rooted<AbstractGeneratorObject*> genObj(cx);
|
||||
GeneratorWeakMap::AddPtr gp;
|
||||
if (referent.isGeneratorFrame()) {
|
||||
{
|
||||
AutoRealm ar(cx, referent.callee());
|
||||
genObj = GetGeneratorObjectForFrame(cx, referent);
|
||||
}
|
||||
if (genObj) {
|
||||
gp = generatorFrames.lookupForAdd(genObj);
|
||||
GeneratorWeakMap::Ptr gp = generatorFrames.lookup(genObj);
|
||||
if (gp) {
|
||||
frame = &gp->value()->as<DebuggerFrame>();
|
||||
MOZ_ASSERT(&frame->unwrappedGenerator() == genObj);
|
||||
|
|
Загрузка…
Ссылка в новой задаче