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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp

Issue 2458183002: Eagerly install Origin Trial features on window (Closed)
Patch Set: Clean up Created 4 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
Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
index a37984bd69ae19ba8d4b36c629cebd4116bcb44d..65f4bae67165bada232fbc331dc49acf0dceec50 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
@@ -138,41 +138,45 @@ static void installV8TestConstantsTemplate(v8::Isolate* isolate, const DOMWrappe
static_assert(1 == TestConstants::CONST_IMPL, "the value of TestConstants_CONST_IMPL does not match with implementation");
}
-void V8TestConstants::installFeatureName1(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
+void V8TestConstants::installFeatureName1(const ScriptState* scriptState, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
+ v8::Isolate* isolate = scriptState->isolate();
+ const DOMWrapperWorld& world = scriptState->world();
const V8DOMConfiguration::ConstantConfiguration constantFeature1OriginTrialEnabledConst1Configuration = {"FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1", 6, 0, V8DOMConfiguration::ConstantTypeShort};
V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature1OriginTrialEnabledConst1Configuration);
const V8DOMConfiguration::ConstantConfiguration constantFeature1OriginTrialEnabledConst2Configuration = {"FEATURE1_ORIGIN_TRIAL_ENABLED_CONST2", 7, 0, V8DOMConfiguration::ConstantTypeShort};
V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature1OriginTrialEnabledConst2Configuration);
}
-void V8TestConstants::installFeatureName1(ScriptState* scriptState, v8::Local<v8::Object> instance) {
+void V8TestConstants::installFeatureName1(const ScriptState* scriptState, v8::Local<v8::Object> instance) {
V8PerContextData* perContextData = V8PerContextData::from(scriptState->context());
v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestConstants::wrapperTypeInfo);
v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestConstants::wrapperTypeInfo);
ALLOW_UNUSED_LOCAL(interface);
- installFeatureName1(scriptState->isolate(), scriptState->world(), instance, prototype, interface);
+ installFeatureName1(scriptState, instance, prototype, interface);
}
-void V8TestConstants::installFeatureName1(ScriptState* scriptState) {
+void V8TestConstants::installFeatureName1(const ScriptState* scriptState) {
installFeatureName1(scriptState, v8::Local<v8::Object>());
}
-void V8TestConstants::installFeatureName2(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
+void V8TestConstants::installFeatureName2(const ScriptState* scriptState, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
+ v8::Isolate* isolate = scriptState->isolate();
+ const DOMWrapperWorld& world = scriptState->world();
const V8DOMConfiguration::ConstantConfiguration constantFeature2OriginTrialEnabledConst1Configuration = {"FEATURE2_ORIGIN_TRIAL_ENABLED_CONST1", 8, 0, V8DOMConfiguration::ConstantTypeShort};
V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature2OriginTrialEnabledConst1Configuration);
const V8DOMConfiguration::ConstantConfiguration constantFeature2OriginTrialEnabledConst2Configuration = {"FEATURE2_ORIGIN_TRIAL_ENABLED_CONST2", 9, 0, V8DOMConfiguration::ConstantTypeShort};
V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature2OriginTrialEnabledConst2Configuration);
}
-void V8TestConstants::installFeatureName2(ScriptState* scriptState, v8::Local<v8::Object> instance) {
+void V8TestConstants::installFeatureName2(const ScriptState* scriptState, v8::Local<v8::Object> instance) {
V8PerContextData* perContextData = V8PerContextData::from(scriptState->context());
v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestConstants::wrapperTypeInfo);
v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestConstants::wrapperTypeInfo);
ALLOW_UNUSED_LOCAL(interface);
- installFeatureName2(scriptState->isolate(), scriptState->world(), instance, prototype, interface);
+ installFeatureName2(scriptState, instance, prototype, interface);
}
-void V8TestConstants::installFeatureName2(ScriptState* scriptState) {
+void V8TestConstants::installFeatureName2(const ScriptState* scriptState) {
installFeatureName2(scriptState, v8::Local<v8::Object>());
}
v8::Local<v8::FunctionTemplate> V8TestConstants::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {

Powered by Google App Engine
This is Rietveld 408576698