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

Unified Diff: Source/core/dom/Document.cpp

Issue 20890003: Limit console messages' automatic collection of parser state. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline "fast/frames/sandboxed-iframe-autofocus-denied.html" Created 7 years, 5 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/dom/Document.h ('k') | Source/core/dom/ScriptExecutionContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index b3fc7f14359dada020f4dfa5ed5727064c2bfc11..bf0c47e894964abb485b7e242b1cc8d92157db53 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2678,13 +2678,13 @@ void Document::processHttpEquivRefresh(const String& content)
if (protocolIsJavaScript(refreshUrl)) {
String message = "Refused to refresh " + m_url.elidedString() + " to a javascript: URL";
- addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message);
+ addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, 0, ForceParserStateCollection);
return;
}
if (isSandboxed(SandboxAutomaticFeatures)) {
String message = "Refused to execute the redirect specified via '<meta http-equiv='refresh' content='...'>'. The document is sandboxed, and the 'allow-scripts' keyword is not set.";
- addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message);
+ addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, 0, ForceParserStateCollection);
return;
}
@@ -2717,7 +2717,7 @@ void Document::processHttpEquivXFrameOptions(const String& content)
// intent, we must navigate away from the possibly partially-rendered document to a location that
// doesn't inherit the parent's SecurityOrigin.
frame->navigationScheduler()->scheduleLocationChange(securityOrigin(), SecurityOrigin::urlWithUniqueSecurityOrigin(), String());
- addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, requestIdentifier);
+ addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, requestIdentifier, ForceParserStateCollection);
}
}
@@ -4408,7 +4408,7 @@ void Document::parseDNSPrefetchControlHeader(const String& dnsPrefetchControl)
m_haveExplicitlyDisabledDNSPrefetch = true;
}
-void Document::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, unsigned long requestIdentifier)
+void Document::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, unsigned long requestIdentifier, ParserStateCollectionDisposition parserStateDisposition)
{
if (!isContextThread()) {
postTask(AddConsoleMessageTask::create(source, level, message));
@@ -4416,7 +4416,7 @@ void Document::addConsoleMessage(MessageSource source, MessageLevel level, const
}
if (Page* page = this->page())
- page->console()->addMessage(source, level, message, requestIdentifier, this);
+ page->console()->addMessage(source, level, message, requestIdentifier, this, parserStateDisposition);
}
void Document::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/ScriptExecutionContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698