| Index: Source/bindings/core/v8/PostMessage.h
|
| diff --git a/Source/bindings/core/v8/PostMessage.h b/Source/bindings/core/v8/PostMessage.h
|
| deleted file mode 100644
|
| index 756a259f6fec9ec4197b09e45721bbd4f6042cf8..0000000000000000000000000000000000000000
|
| --- a/Source/bindings/core/v8/PostMessage.h
|
| +++ /dev/null
|
| @@ -1,51 +0,0 @@
|
| -// Copyright 2014 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#ifndef PostMessage_h
|
| -#define PostMessage_h
|
| -
|
| -#include "bindings/core/v8/ExceptionState.h"
|
| -#include "bindings/core/v8/SerializedScriptValue.h"
|
| -#include "bindings/core/v8/SerializedScriptValueFactory.h"
|
| -#include "bindings/core/v8/V8Binding.h"
|
| -#include "bindings/core/v8/V8BindingMacros.h"
|
| -#include "core/dom/DOMArrayBuffer.h"
|
| -#include "core/dom/MessagePort.h"
|
| -#include <v8.h>
|
| -
|
| -namespace blink {
|
| -
|
| -class ExecutionContext;
|
| -
|
| -// FIXME: This should be auto-generated by a code generator template.
|
| -template <class Type>
|
| -void postMessageMethodCommon(const char* interfaceName, Type* instance, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage", interfaceName, info.Holder(), info.GetIsolate());
|
| - if (UNLIKELY(info.Length() < 1)) {
|
| - setMinimumArityTypeError(exceptionState, 1, info.Length());
|
| - exceptionState.throwIfNeeded();
|
| - return;
|
| - }
|
| - OwnPtrWillBeRawPtr<MessagePortArray> ports = adoptPtrWillBeNoop(new MessagePortArray);
|
| - ArrayBufferArray arrayBuffers;
|
| - if (info.Length() > 1) {
|
| - const int transferablesArgIndex = 1;
|
| - if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info[transferablesArgIndex], transferablesArgIndex, *ports, arrayBuffers, exceptionState)) {
|
| - exceptionState.throwIfNeeded();
|
| - return;
|
| - }
|
| - }
|
| - RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instance().create(info.GetIsolate(), info[0], ports.get(), &arrayBuffers, exceptionState);
|
| - if (exceptionState.throwIfNeeded())
|
| - return;
|
| - // FIXME: Only pass context/exceptionState if instance really requires it.
|
| - ExecutionContext* context = currentExecutionContext(info.GetIsolate());
|
| - instance->postMessage(context, message.release(), ports.get(), exceptionState);
|
| - exceptionState.throwIfNeeded();
|
| -}
|
| -
|
| -} // namespace blink
|
| -
|
| -#endif // PostMessage_h
|
|
|