Ignore:
Timestamp:
Feb 16, 2018, 11:05:07 AM (7 years ago)
Author:
Chris Dumez
Message:
ASSERTION FAILED: !m_processes[i]
*m_processes[i] == process in MessagePortChannel::entanglePortWithProcess()

https://bugs.webkit.org/show_bug.cgi?id=182054
<rdar://problem/36871207>

Reviewed by Brady Eidson.

Pipe postMessage messages to and from service workers via the UIProcess instead of going
directly to the StorageProcess. This is temporarily needed to avoid races due to the
MessagePort registry currently living in the UIProcess and postMessage messages potentially
sending MessagePort objects.

This change is covered by tests on the bots that currently flakily crash in debug.

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::postMessageToServiceWorker):

  • StorageProcess/StorageProcess.h:
  • StorageProcess/StorageProcess.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::postMessageToServiceWorkerClient):
(WebKit::WebProcessPool::postMessageToServiceWorker):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessPool.messages.in:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::postMessageToServiceWorker):

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/UIProcess/WebProcessPool.messages.in

    r220857 r228564  
    3737
    3838    ReportWebContentCPUTime(Seconds cpuTime, uint64_t activityState)
     39
     40#if ENABLE(SERVICE_WORKER)
     41    PostMessageToServiceWorkerClient(struct WebCore::ServiceWorkerClientIdentifier destinationIdentifier, struct WebCore::MessageWithMessagePorts message, WebCore::ServiceWorkerIdentifier sourceIdentifier, String sourceOrigin)
     42    PostMessageToServiceWorker(WebCore::ServiceWorkerIdentifier destination, struct WebCore::MessageWithMessagePorts message, WebCore::ServiceWorkerOrClientIdentifier source, WebCore::SWServerConnectionIdentifier connectionIdentifier)
     43#endif
    3944}
Note: See TracChangeset for help on using the changeset viewer.