Commit 6e803258 authored by Joel Einbinder's avatar Joel Einbinder Committed by Commit Bot

DevTools: Show OOPIFs at the correct depth in ConsoleContextSelector

Bug: 835492
Change-Id: I172ab5075523f86eca85b4013dc0b77a82650dad
Reviewed-on: https://chromium-review.googlesource.com/1103543Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567875}
parent d6827fb7
......@@ -97,9 +97,12 @@ Console.ConsoleContextSelector = class {
if (executionContext.frameId) {
const resourceTreeModel = target.model(SDK.ResourceTreeModel);
let frame = resourceTreeModel && resourceTreeModel.frameForId(executionContext.frameId);
while (frame && frame.parentFrame) {
depth++;
frame = frame.parentFrame;
while (frame) {
frame = frame.parentFrame || frame.crossTargetParentFrame();
if (frame) {
depth++;
target = frame.resourceTreeModel().target();
}
}
}
let targetDepth = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment