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

Side by Side Diff: third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp

Issue 2780093003: V8 bindings gen: Error if OriginTrialEnabled and SecureContext together. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/scripts/v8_utilities.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bindings/modules/v8/ConditionalFeaturesForModules.h" 5 #include "bindings/modules/v8/ConditionalFeaturesForModules.h"
6 6
7 #include "bindings/core/v8/ConditionalFeatures.h" 7 #include "bindings/core/v8/ConditionalFeatures.h"
8 #include "bindings/core/v8/ConditionalFeaturesForCore.h" 8 #include "bindings/core/v8/ConditionalFeaturesForCore.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/V8DedicatedWorkerGlobalScope.h" 10 #include "bindings/core/v8/V8DedicatedWorkerGlobalScope.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 executionContext->isSecureContext()) { 58 executionContext->isSecureContext()) {
59 V8NavigatorPartial::installInstalledApp(isolate, world, 59 V8NavigatorPartial::installInstalledApp(isolate, world,
60 v8::Local<v8::Object>(), 60 v8::Local<v8::Object>(),
61 prototypeObject, interfaceObject); 61 prototypeObject, interfaceObject);
62 } 62 }
63 if (OriginTrials::webShareEnabled(executionContext)) { 63 if (OriginTrials::webShareEnabled(executionContext)) {
64 V8NavigatorPartial::installWebShare(isolate, world, 64 V8NavigatorPartial::installWebShare(isolate, world,
65 v8::Local<v8::Object>(), 65 v8::Local<v8::Object>(),
66 prototypeObject, interfaceObject); 66 prototypeObject, interfaceObject);
67 } 67 }
68 // Mimics the [SecureContext] extended attribute. 68 // Mimics the [SecureContext] extended attribute. Work-around for
69 // https://crbug.com/695123.
69 if (OriginTrials::webUSBEnabled(executionContext) && 70 if (OriginTrials::webUSBEnabled(executionContext) &&
70 executionContext->isSecureContext()) { 71 executionContext->isSecureContext()) {
71 V8NavigatorPartial::installWebUSB(isolate, world, v8::Local<v8::Object>(), 72 V8NavigatorPartial::installWebUSB(isolate, world, v8::Local<v8::Object>(),
72 prototypeObject, interfaceObject); 73 prototypeObject, interfaceObject);
73 } 74 }
74 if (OriginTrials::webVREnabled(executionContext)) { 75 if (OriginTrials::webVREnabled(executionContext)) {
75 V8NavigatorPartial::installWebVR(isolate, world, v8::Local<v8::Object>(), 76 V8NavigatorPartial::installWebVR(isolate, world, v8::Local<v8::Object>(),
76 prototypeObject, interfaceObject); 77 prototypeObject, interfaceObject);
77 } 78 }
78 } else if (wrapperTypeInfo == &V8Window::wrapperTypeInfo) { 79 } else if (wrapperTypeInfo == &V8Window::wrapperTypeInfo) {
79 v8::Local<v8::Object> instanceObject = scriptState->context()->Global(); 80 v8::Local<v8::Object> instanceObject = scriptState->context()->Global();
80 if (OriginTrials::imageCaptureEnabled(executionContext)) { 81 if (OriginTrials::imageCaptureEnabled(executionContext)) {
81 V8WindowPartial::installImageCapture(isolate, world, instanceObject, 82 V8WindowPartial::installImageCapture(isolate, world, instanceObject,
82 prototypeObject, interfaceObject); 83 prototypeObject, interfaceObject);
83 } 84 }
84 // Mimics the [SecureContext] extended attribute. 85 // Mimics the [SecureContext] extended attribute. Work-around for
86 // https://crbug.com/695123.
85 if (OriginTrials::webUSBEnabled(executionContext) && 87 if (OriginTrials::webUSBEnabled(executionContext) &&
86 executionContext->isSecureContext()) { 88 executionContext->isSecureContext()) {
87 V8WindowPartial::installWebUSB(isolate, world, instanceObject, 89 V8WindowPartial::installWebUSB(isolate, world, instanceObject,
88 prototypeObject, interfaceObject); 90 prototypeObject, interfaceObject);
89 } 91 }
90 if (OriginTrials::webVREnabled(executionContext)) { 92 if (OriginTrials::webVREnabled(executionContext)) {
91 V8WindowPartial::installWebVR(isolate, world, instanceObject, 93 V8WindowPartial::installWebVR(isolate, world, instanceObject,
92 prototypeObject, interfaceObject); 94 prototypeObject, interfaceObject);
93 } 95 }
94 if (OriginTrials::gamepadExtensionsEnabled(executionContext)) { 96 if (OriginTrials::gamepadExtensionsEnabled(executionContext)) {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 registerInstallConditionalFeaturesForCore(); 277 registerInstallConditionalFeaturesForCore();
276 s_originalInstallConditionalFeaturesFunction = 278 s_originalInstallConditionalFeaturesFunction =
277 setInstallConditionalFeaturesFunction( 279 setInstallConditionalFeaturesFunction(
278 &installConditionalFeaturesForModules); 280 &installConditionalFeaturesForModules);
279 s_originalInstallPendingConditionalFeatureFunction = 281 s_originalInstallPendingConditionalFeatureFunction =
280 setInstallPendingConditionalFeatureFunction( 282 setInstallPendingConditionalFeatureFunction(
281 &installPendingConditionalFeatureForModules); 283 &installPendingConditionalFeatureForModules);
282 } 284 }
283 285
284 } // namespace blink 286 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/scripts/v8_utilities.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698