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

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

Issue 2532213002: [Origin Trials] Rename confusing 'global' variable (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp
diff --git a/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp
index c078544a945940290359f0625400a428c75071ea..280ba64e6172d39bbf453cb390d74716b507700a 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp
@@ -45,7 +45,6 @@ void installConditionalFeaturesForModules(
return;
v8::Isolate* isolate = scriptState->isolate();
const DOMWrapperWorld& world = scriptState->world();
- v8::Local<v8::Object> global = scriptState->context()->Global();
if (wrapperTypeInfo == &V8Navigator::wrapperTypeInfo) {
if (OriginTrials::webShareEnabled(executionContext)) {
V8NavigatorPartial::installWebShare(isolate, world,
@@ -57,30 +56,32 @@ void installConditionalFeaturesForModules(
prototypeObject, interfaceObject);
}
if (OriginTrials::webVREnabled(executionContext)) {
- V8NavigatorPartial::installWebVR(isolate, world, global, prototypeObject,
- interfaceObject);
+ V8NavigatorPartial::installWebVR(isolate, world, v8::Local<v8::Object>(),
+ prototypeObject, interfaceObject);
}
} else if (wrapperTypeInfo == &V8Window::wrapperTypeInfo) {
+ v8::Local<v8::Object> instanceObject = scriptState->context()->Global();
if (OriginTrials::imageCaptureEnabled(executionContext)) {
- V8WindowPartial::installImageCapture(isolate, world, global,
+ V8WindowPartial::installImageCapture(isolate, world, instanceObject,
prototypeObject, interfaceObject);
}
if (OriginTrials::webUSBEnabled(executionContext)) {
- V8WindowPartial::installWebUSB(isolate, world, global, prototypeObject,
- interfaceObject);
+ V8WindowPartial::installWebUSB(isolate, world, instanceObject,
+ prototypeObject, interfaceObject);
}
if (OriginTrials::webVREnabled(executionContext)) {
- V8WindowPartial::installWebVR(isolate, world, global, prototypeObject,
- interfaceObject);
+ V8WindowPartial::installWebVR(isolate, world, instanceObject,
+ prototypeObject, interfaceObject);
}
if (OriginTrials::gamepadExtensionsEnabled(executionContext)) {
V8WindowPartial::installGamepadExtensions(
- isolate, world, global, prototypeObject, interfaceObject);
+ isolate, world, instanceObject, prototypeObject, interfaceObject);
}
} else if (wrapperTypeInfo == &V8ServiceWorkerGlobalScope::wrapperTypeInfo) {
+ v8::Local<v8::Object> instanceObject = scriptState->context()->Global();
if (OriginTrials::foreignFetchEnabled(executionContext)) {
V8ServiceWorkerGlobalScope::installForeignFetch(
- isolate, world, global, prototypeObject, interfaceObject);
+ isolate, world, instanceObject, prototypeObject, interfaceObject);
}
} else if (wrapperTypeInfo == &V8InstallEvent::wrapperTypeInfo) {
if (OriginTrials::foreignFetchEnabled(executionContext)) {
@@ -90,13 +91,15 @@ void installConditionalFeaturesForModules(
}
} else if (wrapperTypeInfo == &V8Gamepad::wrapperTypeInfo) {
if (OriginTrials::gamepadExtensionsEnabled(executionContext)) {
- V8Gamepad::installGamepadExtensions(isolate, world, global,
+ V8Gamepad::installGamepadExtensions(isolate, world,
+ v8::Local<v8::Object>(),
prototypeObject, interfaceObject);
}
} else if (wrapperTypeInfo == &V8GamepadButton::wrapperTypeInfo) {
if (OriginTrials::gamepadExtensionsEnabled(executionContext)) {
V8GamepadButton::installGamepadExtensions(
- isolate, world, global, prototypeObject, interfaceObject);
+ isolate, world, v8::Local<v8::Object>(), prototypeObject,
+ interfaceObject);
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698