| Index: Source/bindings/v8/custom/V8ClientCustom.cpp
|
| diff --git a/Source/bindings/v8/custom/V8ServiceWorkerCustom.cpp b/Source/bindings/v8/custom/V8ClientCustom.cpp
|
| similarity index 79%
|
| copy from Source/bindings/v8/custom/V8ServiceWorkerCustom.cpp
|
| copy to Source/bindings/v8/custom/V8ClientCustom.cpp
|
| index 76ae831623153386024f70b3d673097af5250d16..2c4677091d0f8f14acedbb4176e5ad495152975b 100644
|
| --- a/Source/bindings/v8/custom/V8ServiceWorkerCustom.cpp
|
| +++ b/Source/bindings/v8/custom/V8ClientCustom.cpp
|
| @@ -3,7 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include "config.h"
|
| -#include "V8ServiceWorker.h"
|
| +#include "V8Client.h"
|
|
|
| #include "bindings/v8/ExceptionMessages.h"
|
| #include "bindings/v8/ExceptionState.h"
|
| @@ -15,10 +15,10 @@
|
|
|
| namespace WebCore {
|
|
|
| -void V8ServiceWorker::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +void V8Client::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage", "ServiceWorker", info.Holder(), info.GetIsolate());
|
| - ServiceWorker* worker = V8ServiceWorker::toNative(info.Holder());
|
| + Client* client = V8Client::toNative(info.Holder());
|
| MessagePortArray ports;
|
| ArrayBufferArray arrayBuffers;
|
| if (info.Length() > 1) {
|
| @@ -31,7 +31,8 @@ void V8ServiceWorker::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8:
|
| RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(info[0], &ports, &arrayBuffers, exceptionState, info.GetIsolate());
|
| if (exceptionState.throwIfNeeded())
|
| return;
|
| - worker->postMessage(message.release(), &ports, exceptionState);
|
| + ExecutionContext* context = currentExecutionContext(info.GetIsolate());
|
| + client->postMessage(context, message.release(), &ports, exceptionState);
|
| exceptionState.throwIfNeeded();
|
| }
|
|
|
|
|