Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Unified Diff: sky/engine/bindings/core/v8/PostMessage.h

Issue 676723003: Remove postMessage, MessageChannel and MessagePort. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/engine/bindings/core/v8/PostMessage.h
diff --git a/sky/engine/bindings/core/v8/PostMessage.h b/sky/engine/bindings/core/v8/PostMessage.h
deleted file mode 100644
index eaed55e9f712379fb893c13959a72696a9bc59f1..0000000000000000000000000000000000000000
--- a/sky/engine/bindings/core/v8/PostMessage.h
+++ /dev/null
@@ -1,45 +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/V8Binding.h"
-#include "bindings/core/v8/V8BindingMacros.h"
-#include "core/dom/MessagePort.h"
-#include "wtf/ArrayBuffer.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());
- MessagePortArray ports;
- ArrayBufferArray arrayBuffers;
- if (info.Length() > 1) {
- const int transferablesArgIndex = 1;
- if (!SerializedScriptValue::extractTransferables(info[transferablesArgIndex], transferablesArgIndex, ports, arrayBuffers, exceptionState, info.GetIsolate())) {
- exceptionState.throwIfNeeded();
- return;
- }
- }
- RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(info[0], &ports, &arrayBuffers, exceptionState, info.GetIsolate());
- 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, exceptionState);
- exceptionState.throwIfNeeded();
-}
-
-} // namespace blink
-
-#endif // PostMessage_h
« no previous file with comments | « sky/engine/bindings/core/v8/DictionaryHelperForCore.cpp ('k') | sky/engine/bindings/core/v8/SerializedScriptValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698