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

Unified Diff: Source/core/frame/UseCounter.cpp

Issue 656693002: Don't count UseCounters in private scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/frame/UseCounter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/UseCounter.cpp
diff --git a/Source/core/frame/UseCounter.cpp b/Source/core/frame/UseCounter.cpp
index b21ec8083470038dd695ec801542fe00653b9ad9..9287e8352476056f69f3d440585ef56905f9b3bb 100644
--- a/Source/core/frame/UseCounter.cpp
+++ b/Source/core/frame/UseCounter.cpp
@@ -605,6 +605,20 @@ void UseCounter::count(const ExecutionContext* context, Feature feature)
toWorkerGlobalScope(context)->countFeature(feature);
}
+void UseCounter::countIfNotPrivateScript(v8::Isolate* isolate, const Document& document, Feature feature)
+{
+ if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld())
+ return;
+ UseCounter::count(document, feature);
+}
+
+void UseCounter::countIfNotPrivateScript(v8::Isolate* isolate, const ExecutionContext* context, Feature feature)
+{
+ if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld())
+ return;
+ UseCounter::count(context, feature);
+}
+
void UseCounter::countDeprecation(ExecutionContext* context, Feature feature)
{
if (!context)
@@ -637,6 +651,13 @@ void UseCounter::countDeprecation(const Document& document, Feature feature)
}
}
+void UseCounter::countDeprecationIfNotPrivateScript(v8::Isolate* isolate, ExecutionContext* context, Feature feature)
+{
+ if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld())
+ return;
+ UseCounter::countDeprecation(context, feature);
+}
+
// FIXME: Update other UseCounter::deprecationMessage() cases to use this.
static String replacedBy(const char* oldString, const char* newString)
{
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698