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

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

Issue 2700063003: Add a use counter for creating processing instructions on HTML docs (Closed)
Patch Set: Created 3 years, 10 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 | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index bab0b6ed7e0395e7c5b2cd33274ab8919e608690..685a2737cfabe75c890847b3331872ea4ace87ce 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -997,6 +997,10 @@ ProcessingInstruction* Document::createProcessingInstruction(
"The data provided ('" + data + "') contains '?>'.");
return nullptr;
}
+ if (isHTMLDocument()) {
+ UseCounter::count(*this,
+ UseCounter::HTMLDocumentCreateProcessingInstruction);
+ }
return ProcessingInstruction::create(*this, target, data);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698