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) |
{ |