| Index: Source/modules/serviceworkers/ServiceWorkerClient.cpp
|
| diff --git a/Source/modules/serviceworkers/ServiceWorkerClient.cpp b/Source/modules/serviceworkers/ServiceWorkerClient.cpp
|
| index 4ee82cac8eb8960e6cf6b4ad4c3d25af3d038a2a..109f50fb943abfe7396fcd7c8bb2df533a887be8 100644
|
| --- a/Source/modules/serviceworkers/ServiceWorkerClient.cpp
|
| +++ b/Source/modules/serviceworkers/ServiceWorkerClient.cpp
|
| @@ -21,6 +21,7 @@ ServiceWorkerClient* ServiceWorkerClient::create(const WebServiceWorkerClientInf
|
|
|
| ServiceWorkerClient::ServiceWorkerClient(const WebServiceWorkerClientInfo& info)
|
| : m_id(info.clientID)
|
| + , m_uuid(info.uuid)
|
| , m_url(info.url.string())
|
| {
|
| }
|
| @@ -38,7 +39,12 @@ void ServiceWorkerClient::postMessage(ExecutionContext* context, PassRefPtr<Seri
|
|
|
| WebString messageString = message->toWireString();
|
| OwnPtr<WebMessagePortChannelArray> webChannels = MessagePort::toWebMessagePortChannelArray(channels.release());
|
| - ServiceWorkerGlobalScopeClient::from(context)->postMessageToClient(m_id, messageString, webChannels.release());
|
| + if (!m_uuid.isEmpty()) {
|
| + ServiceWorkerGlobalScopeClient::from(context)->postMessageToClient(m_uuid, messageString, webChannels.release());
|
| + } else {
|
| + // FIXME: Deprecate this when we switch to uuid.
|
| + ServiceWorkerGlobalScopeClient::from(context)->postMessageToClient(m_id, messageString, webChannels.release());
|
| + }
|
| }
|
|
|
| } // namespace blink
|
|
|