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

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

Issue 1085033003: Introduce InspectorIdentifiers<> and use it to assign/lookup LocalFrame and DocumentLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: win build error fixed Created 5 years, 8 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 | « Source/core/inspector/InspectorStyleSheet.cpp ('k') | Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageRuntimeAgent.cpp
diff --git a/Source/core/inspector/PageRuntimeAgent.cpp b/Source/core/inspector/PageRuntimeAgent.cpp
index 4ed990f05e188e3f359677751f3a5d506eb27417..7bb1a3d26897f8a273baf545d17c6c0f90b1306b 100644
--- a/Source/core/inspector/PageRuntimeAgent.cpp
+++ b/Source/core/inspector/PageRuntimeAgent.cpp
@@ -39,6 +39,7 @@
#include "core/frame/LocalFrame.h"
#include "core/inspector/InjectedScript.h"
#include "core/inspector/InjectedScriptManager.h"
+#include "core/inspector/InspectorIdentifiers.h"
#include "core/inspector/InspectorPageAgent.h"
#include "core/inspector/InstrumentingAgents.h"
#include "core/page/Page.h"
@@ -111,7 +112,7 @@ void PageRuntimeAgent::didCreateScriptContext(LocalFrame* frame, ScriptState* sc
return;
ASSERT(frontend());
String originString = origin ? origin->toRawString() : "";
- String frameId = m_pageAgent->frameId(frame);
+ String frameId = InspectorIdentifiers<LocalFrame>::identifier(frame);
addExecutionContextToFrontend(scriptState, isMainWorld, originString, frameId);
}
@@ -160,7 +161,7 @@ void PageRuntimeAgent::reportExecutionContextCreation()
LocalFrame* localFrame = toLocalFrame(frame);
if (!localFrame->script().canExecuteScripts(NotAboutToExecuteScript))
continue;
- String frameId = m_pageAgent->frameId(localFrame);
+ String frameId = InspectorIdentifiers<LocalFrame>::identifier(localFrame);
// Ensure execution context is created.
// If initializeMainWorld returns true, then is registered by didCreateScriptContext
« no previous file with comments | « Source/core/inspector/InspectorStyleSheet.cpp ('k') | Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698