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

Unified Diff: Source/core/inspector/InspectorDatabaseAgent.cpp

Issue 115693002: Remove several calls to Page::mainFrame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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 | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDatabaseAgent.cpp
diff --git a/Source/core/inspector/InspectorDatabaseAgent.cpp b/Source/core/inspector/InspectorDatabaseAgent.cpp
index 095c010e1b27f95da34e1d2800ad292b0dee35ea..11960dfe0cf668e8b47c548b5725750c35cff6d4 100644
--- a/Source/core/inspector/InspectorDatabaseAgent.cpp
+++ b/Source/core/inspector/InspectorDatabaseAgent.cpp
@@ -208,6 +208,9 @@ void InspectorDatabaseAgent::didOpenDatabase(PassRefPtr<Database> database, cons
void InspectorDatabaseAgent::didCommitLoad(Frame* frame, DocumentLoader* loader)
{
+ // FIXME: If "frame" is always guarenteed to be in the same Page as loader->frame()
+ // then all we need to check here is loader->frame()->isMainFrame()
+ // and we don't need "frame" at all.
if (loader->frame() != frame->page()->mainFrame())
return;
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698