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

Unified Diff: Source/web/WebDevToolsAgentImpl.cpp

Issue 2023313002: Fixes Dartium crashing if trying to debug code associated with an iFrame. (Closed) Base URL: https://chromium.googlesource.com/dart/dartium/blink@2454_1
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDevToolsAgentImpl.cpp
diff --git a/Source/web/WebDevToolsAgentImpl.cpp b/Source/web/WebDevToolsAgentImpl.cpp
index 3de41ae36c75dba5c172bf59b1ac90751058f43c..82119e49ef577bfd49c3b0747b5a5f6a72c4426b 100644
--- a/Source/web/WebDevToolsAgentImpl.cpp
+++ b/Source/web/WebDevToolsAgentImpl.cpp
@@ -163,6 +163,17 @@ private:
// 0. Flush pending frontend messages.
WebLocalFrameImpl* frameImpl = WebLocalFrameImpl::fromFrame(frame);
WebDevToolsAgentImpl* agent = frameImpl->devToolsAgentImpl();
+
+ // FIXME(terry): Dart fix if the current iFrame doesn't have a dev tools
+ // agent then use the main frame's agent. This allow's
+ // debugging Dart code associated with an iFrame (that's
+ // not the main frame).
+ if (!agent) {
+ LocalFrame* mainFrame = frameImpl->frame()->localFrameRoot();
+ frameImpl = WebLocalFrameImpl::fromFrame(mainFrame);
+ agent = frameImpl->devToolsAgentImpl();
+ }
+
agent->flushPendingProtocolNotifications();
Vector<WebViewImpl*> views;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698