Changeset 249615 in webkit
- Timestamp:
- Sep 7, 2019 1:20:51 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r249614 r249615 1 2019-09-07 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r249353. 4 5 The test for this change is a flaky failure. 6 7 Reverted changeset: 8 9 "Add support for postMessage buffering between the service 10 worker and window" 11 https://bugs.webkit.org/show_bug.cgi?id=201169 12 https://trac.webkit.org/changeset/249353 13 1 14 2019-09-07 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/LayoutTests/TestExpectations
r249517 r249615 210 210 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-mixed-content-to-outscope.https.html [ Skip ] 211 211 imported/w3c/web-platform-tests/service-workers/service-worker/multipart-image.https.html [ Skip ] 212 imported/w3c/web-platform-tests/service-workers/service-worker/postmessage-to-client-message-queue.https.html [ Skip ] 212 213 imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-using-registration.https.html [ Skip ] 213 214 imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-without-using-registration.https.html [ Skip ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r249574 r249615 1 2019-09-07 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r249353. 4 5 The test for this change is a flaky failure. 6 7 Reverted changeset: 8 9 "Add support for postMessage buffering between the service 10 worker and window" 11 https://bugs.webkit.org/show_bug.cgi?id=201169 12 https://trac.webkit.org/changeset/249353 13 1 14 2019-09-06 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/postmessage-to-client-message-queue.https-expected.txt
r249353 r249615 1 1 2 PASS Messages from ServiceWorker to Client only received after DOMContentLoaded event. 3 PASS Messages from ServiceWorker to Client only received after calling startMessages(). 4 PASS Messages from ServiceWorker to Client only received after setting onmessage. 5 PASS Microtasks run before dispatching messages after calling startMessages(). 6 PASS Microtasks run before dispatching messages after setting onmessage. 2 Harness Error (TIMEOUT), message = null 7 3 4 TIMEOUT Messages from ServiceWorker to Client only received after DOMContentLoaded event. Test timed out 5 NOTRUN Messages from ServiceWorker to Client only received after calling startMessages(). 6 NOTRUN Messages from ServiceWorker to Client only received after setting onmessage. 7 NOTRUN Microtasks run before dispatching messages after calling startMessages(). 8 NOTRUN Microtasks run before dispatching messages after setting onmessage. 9 -
trunk/LayoutTests/platform/mac-wk1/http/wpt/html/semantics/text-level-semantics/the-a-element/a-download-click-404-expected.txt
r249353 r249615 1 CONSOLE MESSAGE: line 21: TypeError: null is not an object (evaluating 'errorFrame.contentDocument.querySelector("#error-url").click') 1 2 2 3 -
trunk/LayoutTests/platform/win/http/wpt/html/semantics/text-level-semantics/the-a-element/a-download-click-404-expected.txt
r249353 r249615 1 CONSOLE MESSAGE: line 21: TypeError: null is not an object (evaluating 'errorFrame.contentDocument.querySelector("#error-url").click') 1 2 2 3 -
trunk/LayoutTests/resources/testharnessreport.js
r249353 r249615 99 99 // from the page and therefore reduce the output. 100 100 setTimeout(function () { 101 testRunner. forceImmediateCompletion();101 testRunner.notifyDone(); 102 102 }, 0); 103 103 }); -
trunk/Source/WebCore/ChangeLog
r249614 r249615 1 2019-09-07 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r249353. 4 5 The test for this change is a flaky failure. 6 7 Reverted changeset: 8 9 "Add support for postMessage buffering between the service 10 worker and window" 11 https://bugs.webkit.org/show_bug.cgi?id=201169 12 https://trac.webkit.org/changeset/249353 13 1 14 2019-09-07 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/Source/WebCore/dom/Document.cpp
r249378 r249615 194 194 #include "SelectorQuery.h" 195 195 #include "ServiceWorkerClientData.h" 196 #include "ServiceWorkerContainer.h"197 196 #include "ServiceWorkerProvider.h" 198 197 #include "Settings.h" … … 5710 5709 // Parser should have picked up all speculative preloads by now 5711 5710 m_cachedResourceLoader->clearPreloads(CachedResourceLoader::ClearPreloadsMode::ClearSpeculativePreloads); 5712 5713 #if ENABLE(SERVICE_WORKER)5714 if (RuntimeEnabledFeatures::sharedFeatures().serviceWorkerEnabled()) {5715 // Stop queuing service worker client messages now that the DOMContentLoaded event has been fired.5716 if (auto* serviceWorkerContainer = this->serviceWorkerContainer())5717 serviceWorkerContainer->startMessages();5718 }5719 #endif5720 5711 } 5721 5712 -
trunk/Source/WebCore/dom/ScriptExecutionContext.cpp
r249353 r249615 613 613 } 614 614 615 ServiceWorkerContainer* ScriptExecutionContext::ensureServiceWorkerContainer()616 {617 NavigatorBase* navigator = nullptr;618 if (is<Document>(*this)) {619 if (auto* window = downcast<Document>(*this).domWindow())620 navigator = &window->navigator();621 } else622 navigator = &downcast<WorkerGlobalScope>(*this).navigator();623 624 return navigator ? &navigator->serviceWorker() : nullptr;625 }626 627 615 bool ScriptExecutionContext::postTaskTo(const DocumentOrWorkerIdentifier& contextIdentifier, WTF::Function<void(ScriptExecutionContext&)>&& task) 628 616 { -
trunk/Source/WebCore/dom/ScriptExecutionContext.h
r249353 r249615 256 256 257 257 ServiceWorkerContainer* serviceWorkerContainer(); 258 ServiceWorkerContainer* ensureServiceWorkerContainer();259 258 260 259 WEBCORE_EXPORT static bool postTaskTo(const DocumentOrWorkerIdentifier&, WTF::Function<void(ScriptExecutionContext&)>&&); -
trunk/Source/WebCore/workers/service/SWClientConnection.cpp
r249526 r249615 124 124 return; 125 125 126 if (auto* container = destinationDocument->ensureServiceWorkerContainer()) 127 container->postMessage(WTFMove(message), WTFMove(sourceData), WTFMove(sourceOrigin)); 126 destinationDocument->postTask([message = WTFMove(message), sourceData = WTFMove(sourceData), sourceOrigin = WTFMove(sourceOrigin)](auto& context) mutable { 127 if (auto* container = context.serviceWorkerContainer()) 128 container->postMessage(WTFMove(message), WTFMove(sourceData), WTFMove(sourceOrigin)); 129 }); 128 130 } 129 131 -
trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp
r249526 r249615 71 71 : ActiveDOMObject(context) 72 72 , m_navigator(navigator) 73 , m_messageQueue(*this)74 73 { 75 74 suspendIfNeeded(); 76 77 // We should queue messages until the DOMContentLoaded event has fired or startMessages() has been called.78 if (is<Document>(context) && downcast<Document>(*context).parsing())79 m_messageQueue.suspend();80 75 } 81 76 … … 316 311 void ServiceWorkerContainer::startMessages() 317 312 { 318 m_messageQueue.resume();319 313 } 320 314 … … 414 408 415 409 auto messageEvent = MessageEvent::create(MessagePort::entanglePorts(context, WTFMove(message.transferredPorts)), message.message.releaseNonNull(), sourceOrigin, { }, WTFMove(source)); 416 417 m_messageQueue.enqueueEvent(WTFMove(messageEvent)); 410 dispatchEvent(messageEvent); 418 411 } 419 412 … … 523 516 { 524 517 return !hasPendingActivity(); 525 }526 527 void ServiceWorkerContainer::suspend(ReasonForSuspension)528 {529 m_messageQueue.suspend();530 }531 532 void ServiceWorkerContainer::resume()533 {534 m_messageQueue.resume();535 518 } 536 519 … … 586 569 removeAllEventListeners(); 587 570 m_readyPromise = nullptr; 588 m_messageQueue.close();589 571 auto jobMap = WTFMove(m_jobMap); 590 572 for (auto& ongoingJob : jobMap.values()) { … … 631 613 } 632 614 633 bool ServiceWorkerContainer::addEventListener(const AtomString& eventType, Ref<EventListener>&& eventListener, const AddEventListenerOptions& options)634 {635 // Setting the onmessage EventHandler attribute on the ServiceWorkerContainer should start the messages636 // automatically.637 if (eventListener->isAttribute() && eventType == eventNames().messageEvent)638 startMessages();639 640 return EventTargetWithInlineData::addEventListener(eventType, WTFMove(eventListener), options);641 }642 643 615 } // namespace WebCore 644 616 -
trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h
r249526 r249615 31 31 #include "DOMPromiseProxy.h" 32 32 #include "EventTarget.h" 33 #include "GenericEventQueue.h"34 33 #include "SWClientConnection.h" 35 34 #include "SWServer.h" … … 92 91 93 92 private: 94 bool addEventListener(const AtomString& eventType, Ref<EventListener>&&, const AddEventListenerOptions& = { }) final;95 96 93 void scheduleJob(std::unique_ptr<ServiceWorkerJob>&&); 97 94 … … 110 107 SWClientConnection& ensureSWClientConnection(); 111 108 112 // ActiveDOMObject.113 109 const char* activeDOMObjectName() const final; 114 110 bool canSuspendForDocumentSuspension() const final; 115 void suspend(ReasonForSuspension) final;116 void resume() final;117 118 111 ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); } 119 112 EventTargetInterface eventTargetInterface() const final { return ServiceWorkerContainerEventTargetInterfaceType; } … … 145 138 uint64_t m_lastOngoingSettledRegistrationIdentifier { 0 }; 146 139 HashMap<uint64_t, ServiceWorkerRegistrationKey> m_ongoingSettledRegistrations; 147 GenericEventQueue m_messageQueue;148 140 149 141 }; -
trunk/Tools/ChangeLog
r249614 r249615 1 2019-09-07 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r249353. 4 5 The test for this change is a flaky failure. 6 7 Reverted changeset: 8 9 "Add support for postMessage buffering between the service 10 worker and window" 11 https://bugs.webkit.org/show_bug.cgi?id=201169 12 https://trac.webkit.org/changeset/249353 13 1 14 2019-09-07 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r249571 r249615 1726 1726 #endif 1727 1727 1728 if (done)1729 return;1730 1731 1728 updateDisplay(); 1732 1729
Note: See TracChangeset
for help on using the changeset viewer.