Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(793)

Unified Diff: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp

Issue 2064133002: [DevTools] Explicitly reset context group when clearing ScriptController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clear Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/inspector/MainThreadDebugger.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
index dcd4d44cb4340132e659c97d689bbbb5d0f8cedd..e5e1ed8d6441dec91d87c118129b3aeef19d8c17 100644
--- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
@@ -100,13 +100,18 @@ void MainThreadDebugger::setClientMessageLoop(PassOwnPtr<ClientMessageLoop> clie
m_clientMessageLoop = std::move(clientMessageLoop);
}
+void MainThreadDebugger::didClearContextsForFrame(LocalFrame* frame)
+{
+ DCHECK(isMainThread());
+ if (frame->localFrameRoot() == frame)
+ debugger()->resetContextGroup(contextGroupId(frame));
+}
+
void MainThreadDebugger::contextCreated(ScriptState* scriptState, LocalFrame* frame, SecurityOrigin* origin)
{
ASSERT(isMainThread());
v8::HandleScope handles(scriptState->isolate());
DOMWrapperWorld& world = scriptState->world();
- if (frame->localFrameRoot() == frame && world.isMainWorld())
- debugger()->resetContextGroup(contextGroupId(frame));
debugger()->contextCreated(V8ContextInfo(scriptState->context(), contextGroupId(frame), world.isMainWorld(), origin ? origin->toRawString() : "", world.isIsolatedWorld() ? world.isolatedWorldHumanReadableName() : "", IdentifiersFactory::frameId(frame), scriptState->getExecutionContext()->isDocument()));
}
« no previous file with comments | « third_party/WebKit/Source/core/inspector/MainThreadDebugger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698