Chromium Code Reviews| 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 280ba64e6172d39bbf453cb390d74716b507700a..fbc390cc172c675df10f618acd0251134065dc2d 100644 |
| --- a/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp |
| +++ b/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp |
| @@ -11,11 +11,13 @@ |
| #include "bindings/core/v8/V8Window.h" |
| #include "bindings/core/v8/V8WorkerNavigator.h" |
| #include "bindings/modules/v8/V8DedicatedWorkerGlobalScopePartial.h" |
| +#include "bindings/modules/v8/V8FetchEvent.h" |
| #include "bindings/modules/v8/V8Gamepad.h" |
| #include "bindings/modules/v8/V8GamepadButton.h" |
| #include "bindings/modules/v8/V8InstallEvent.h" |
| #include "bindings/modules/v8/V8NavigatorPartial.h" |
| #include "bindings/modules/v8/V8ServiceWorkerGlobalScope.h" |
| +#include "bindings/modules/v8/V8ServiceWorkerRegistration.h" |
| #include "bindings/modules/v8/V8SharedWorkerGlobalScopePartial.h" |
| #include "bindings/modules/v8/V8WindowPartial.h" |
| #include "bindings/modules/v8/V8WorkerNavigatorPartial.h" |
| @@ -77,12 +79,46 @@ void installConditionalFeaturesForModules( |
| V8WindowPartial::installGamepadExtensions( |
| isolate, world, instanceObject, prototypeObject, interfaceObject); |
| } |
| + if (OriginTrials::serviceWorkerNavigationPreloadEnabled(executionContext)) { |
| + V8WindowPartial::installServiceWorkerNavigationPreload( |
| + isolate, world, instanceObject, prototypeObject, interfaceObject); |
| + } |
| + } else if (wrapperTypeInfo == |
| + &V8DedicatedWorkerGlobalScope::wrapperTypeInfo) { |
| + v8::Local<v8::Object> instanceObject = scriptState->context()->Global(); |
| + if (OriginTrials::serviceWorkerNavigationPreloadEnabled(executionContext)) { |
| + V8DedicatedWorkerGlobalScopePartial:: |
| + installServiceWorkerNavigationPreload( |
| + isolate, world, instanceObject, prototypeObject, interfaceObject); |
| + } |
| + } else if (wrapperTypeInfo == &V8SharedWorkerGlobalScope::wrapperTypeInfo) { |
| + v8::Local<v8::Object> instanceObject = scriptState->context()->Global(); |
| + if (OriginTrials::serviceWorkerNavigationPreloadEnabled(executionContext)) { |
| + V8SharedWorkerGlobalScopePartial::installServiceWorkerNavigationPreload( |
| + 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, instanceObject, prototypeObject, interfaceObject); |
| } |
| + if (OriginTrials::serviceWorkerNavigationPreloadEnabled(executionContext)) { |
| + V8ServiceWorkerGlobalScope::installServiceWorkerNavigationPreload( |
| + isolate, world, instanceObject, prototypeObject, interfaceObject); |
| + } |
| + } else if (wrapperTypeInfo == &V8ServiceWorkerRegistration::wrapperTypeInfo) { |
| + v8::Local<v8::Object> instanceObject = scriptState->context()->Global(); |
|
chasej
2017/01/13 16:28:32
Nit: This line is not needed.
The installServiceW
horo
2017/01/13 16:45:22
Done.
|
| + if (OriginTrials::serviceWorkerNavigationPreloadEnabled(executionContext)) { |
| + V8ServiceWorkerRegistration::installServiceWorkerNavigationPreload( |
| + isolate, world, instanceObject, prototypeObject, interfaceObject); |
| + } |
| + } else if (wrapperTypeInfo == &V8FetchEvent::wrapperTypeInfo) { |
| + v8::Local<v8::Object> instanceObject = scriptState->context()->Global(); |
|
chasej
2017/01/13 16:28:32
Nit: This line is not needed. See my comment above
horo
2017/01/13 16:45:22
Done.
|
| + if (OriginTrials::serviceWorkerNavigationPreloadEnabled(executionContext)) { |
| + V8FetchEvent::installServiceWorkerNavigationPreload( |
| + isolate, world, instanceObject, prototypeObject, interfaceObject); |
| + } |
| } else if (wrapperTypeInfo == &V8InstallEvent::wrapperTypeInfo) { |
| if (OriginTrials::foreignFetchEnabled(executionContext)) { |
| V8InstallEvent::installForeignFetch(isolate, world, |