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

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

Issue 1017903003: Add metrics for setting document.domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: actually rebase Created 5 years, 9 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 | Source/core/frame/UseCounter.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 7b8f91baf1a3090645b4bd4bf4867742557e27a2..c5adc02aed043c97f297ad888307b18ee32919bd 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3925,6 +3925,8 @@ String Document::domain() const
void Document::setDomain(const String& newDomain, ExceptionState& exceptionState)
{
+ UseCounter::count(*this, UseCounter::DocumentSetDomain);
+
if (isSandboxed(SandboxDocumentDomain)) {
exceptionState.throwSecurityError("Assignment is forbidden for sandboxed iframes.");
return;
« no previous file with comments | « no previous file | Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698