Index: third_party/WebKit/Source/modules/vr/NavigatorVR.cpp |
diff --git a/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp b/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp |
index 356d998a0629dfd7c7dbbd43f929b96511d3fcce..19ac2cc638105030ddc3cf248e9c3f5d4f9f1f29 100644 |
--- a/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp |
+++ b/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp |
@@ -57,6 +57,14 @@ ScriptPromise NavigatorVR::getVRDisplays(ScriptState* scriptState) |
return promise; |
} |
+ ExecutionContext* executionContext = scriptState->getExecutionContext(); |
+ String errorMessage; |
+ if (executionContext->isSecureContext(errorMessage)) { |
+ UseCounter::count(*document, UseCounter::VRGetDisplays); |
+ } else { |
+ UseCounter::count(*document, UseCounter::VRGetDisplaysInsecureOrigin); |
+ } |
+ |
UseCounter::count(*document, UseCounter::VRGetDisplays); |
amp
2016/10/05 20:43:14
Shouldn't this be removed since you are now counti
billorr
2016/10/05 21:01:03
Acknowledged.
ddorwin
2016/10/05 21:32:43
We definitely don't want to call this twice (thoug
billorr
2016/10/05 21:55:27
Acknowledged.
billorr
2016/10/05 22:47:55
Done.
billorr
2016/10/05 22:47:55
Done.
|
controller()->getDisplays(resolver); |