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

Unified Diff: Source/bindings/v8/V8WindowShell.cpp

Issue 315373002: Cleaning WebDOMActivityLogger interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix Created 6 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 | « Source/bindings/v8/V8WindowShell.h ('k') | Source/web/WebDOMActivityLogger.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8WindowShell.cpp
diff --git a/Source/bindings/v8/V8WindowShell.cpp b/Source/bindings/v8/V8WindowShell.cpp
index 35814fd800428ccfa46dccb1e077a70aa340b1f4..d91945d09164d9e894fe49f56bf247370501d745 100644
--- a/Source/bindings/v8/V8WindowShell.cpp
+++ b/Source/bindings/v8/V8WindowShell.cpp
@@ -216,14 +216,13 @@ bool V8WindowShell::initialize()
setInjectedScriptContextDebugId(context, m_frame->script().contextDebugId(mainWindow->context()));
}
- m_scriptState->perContextData()->setActivityLogger(V8DOMActivityLogger::activityLogger(
- m_world->worldId(), m_frame->document() ? m_frame->document()->baseURI() : KURL()));
if (!installDOMWindow()) {
disposeContext(DoNotDetachGlobal);
return false;
}
if (m_world->isMainWorld()) {
+ // ActivityLogger for main world is updated within updateDocument().
updateDocument();
if (m_frame->document()) {
setSecurityToken(m_frame->document()->securityOrigin());
@@ -232,6 +231,7 @@ bool V8WindowShell::initialize()
context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate, csp->evalDisabledErrorMessage()));
}
} else {
+ updateActivityLogger();
SecurityOrigin* origin = m_world->isolatedWorldSecurityOrigin();
setSecurityToken(origin);
if (origin && InspectorInstrumentation::hasFrontends()) {
@@ -369,6 +369,12 @@ void V8WindowShell::clearDocumentProperty()
m_scriptState->context()->Global()->ForceDelete(v8AtomicString(m_isolate, "document"));
}
+void V8WindowShell::updateActivityLogger()
+{
+ m_scriptState->perContextData()->setActivityLogger(V8DOMActivityLogger::activityLogger(
+ m_world->worldId(), m_frame->document() ? m_frame->document()->baseURI() : KURL()));
+}
+
void V8WindowShell::setSecurityToken(SecurityOrigin* origin)
{
// If two tokens are equal, then the SecurityOrigins canAccess each other.
@@ -410,6 +416,7 @@ void V8WindowShell::updateDocument()
return;
if (!isContextInitialized())
return;
+ updateActivityLogger();
updateDocumentProperty();
updateSecurityOrigin(m_frame->document()->securityOrigin());
}
« no previous file with comments | « Source/bindings/v8/V8WindowShell.h ('k') | Source/web/WebDOMActivityLogger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698