Changeset 224153 in webkit


Ignore:
Timestamp:
Oct 28, 2017 10:40:54 AM (7 years ago)
Author:
Chris Dumez
Message:

self.ExtendableEvent / Client / Clients / WindowClient do not exist in a Service Worker
https://bugs.webkit.org/show_bug.cgi?id=178976

Reviewed by Sam Weinig.

Source/WebCore:

Test: http/tests/workers/service/ServiceWorkerGlobalScope-properties.html

  • workers/service/ExtendableEvent.idl:
  • workers/service/FetchEvent.idl:

Drop [Exposed=Worker] as there is already [Exposed=ServiceWorker] and
ServiceWorkerGlobalScope inherits from WorkerGlobalScope. This is redundant
and we would hit assertions and adding the global constructors at runtime
when the feature is enabled, because the property already exists.

Source/WebKit:

Actually enable the Service Worker RuntimeEnabledFeature in the Service Worker
WebProcess.

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::updatePreferences):

LayoutTests:

Add layout test coverage.

  • http/tests/workers/service/ServiceWorkerGlobalScope-properties-expected.txt: Added.
  • http/tests/workers/service/ServiceWorkerGlobalScope-properties.html: Added.
  • http/tests/workers/service/resources/ServiceWorkerGlobalScope-properties-worker.js: Added.
Location:
trunk
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r224142 r224153  
     12017-10-28  Chris Dumez  <cdumez@apple.com>
     2
     3        self.ExtendableEvent / Client / Clients / WindowClient do not exist in a Service Worker
     4        https://bugs.webkit.org/show_bug.cgi?id=178976
     5
     6        Reviewed by Sam Weinig.
     7
     8        Add layout test coverage.
     9
     10        * http/tests/workers/service/ServiceWorkerGlobalScope-properties-expected.txt: Added.
     11        * http/tests/workers/service/ServiceWorkerGlobalScope-properties.html: Added.
     12        * http/tests/workers/service/resources/ServiceWorkerGlobalScope-properties-worker.js: Added.
     13
    1142017-10-27  Devin Rousso  <webkit@devinrousso.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r224150 r224153  
     12017-10-28  Chris Dumez  <cdumez@apple.com>
     2
     3        self.ExtendableEvent / Client / Clients / WindowClient do not exist in a Service Worker
     4        https://bugs.webkit.org/show_bug.cgi?id=178976
     5
     6        Reviewed by Sam Weinig.
     7
     8        Test: http/tests/workers/service/ServiceWorkerGlobalScope-properties.html
     9
     10        * workers/service/ExtendableEvent.idl:
     11        * workers/service/FetchEvent.idl:
     12        Drop [Exposed=Worker] as there is already [Exposed=ServiceWorker] and
     13        ServiceWorkerGlobalScope inherits from WorkerGlobalScope. This is redundant
     14        and we would hit assertions and adding the global constructors at runtime
     15        when the feature is enabled, because the property already exists.
     16
    1172017-10-28  Zalan Bujtas  <zalan@apple.com>
    218
  • trunk/Source/WebCore/workers/service/ExtendableEvent.idl

    r223725 r224153  
    2929    Conditional=SERVICE_WORKER,
    3030    EnabledAtRuntime=ServiceWorker,
    31     Exposed=(ServiceWorker,Worker,Window),
     31    Exposed=(ServiceWorker,Window),
    3232    ExportMacro=WEBCORE_EXPORT,
    3333    JSGenerateToNativeObject,
  • trunk/Source/WebCore/workers/service/FetchEvent.idl

    r223839 r224153  
    3131    EnabledAtRuntime=ServiceWorker,
    3232    ExportMacro=WEBCORE_EXPORT,
    33     Exposed=(ServiceWorker,Worker,Window),
     33    Exposed=(ServiceWorker,Window),
    3434    JSGenerateToNativeObject
    3535] interface FetchEvent : ExtendableEvent {
  • trunk/Source/WebKit/ChangeLog

    r224149 r224153  
     12017-10-28  Chris Dumez  <cdumez@apple.com>
     2
     3        self.ExtendableEvent / Client / Clients / WindowClient do not exist in a Service Worker
     4        https://bugs.webkit.org/show_bug.cgi?id=178976
     5
     6        Reviewed by Sam Weinig.
     7
     8        Actually enable the Service Worker RuntimeEnabledFeature in the Service Worker
     9        WebProcess.
     10
     11        * WebProcess/Storage/WebSWContextManagerConnection.cpp:
     12        (WebKit::WebSWContextManagerConnection::updatePreferences):
     13
    1142017-10-28  Joseph Pecoraro  <pecoraro@apple.com>
    215
  • trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp

    r224113 r224153  
    9191void WebSWContextManagerConnection::updatePreferences(const WebPreferencesStore& store)
    9292{
     93    RuntimeEnabledFeatures::sharedFeatures().setServiceWorkerEnabled(true);
    9394    RuntimeEnabledFeatures::sharedFeatures().setCacheAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::cacheAPIEnabledKey()));
    9495    RuntimeEnabledFeatures::sharedFeatures().setFetchAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::fetchAPIEnabledKey()));
Note: See TracChangeset for help on using the changeset viewer.