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

Unified Diff: Source/bindings/v8/custom/V8ClientCustom.cpp

Issue 331373002: Split bindings/v8/custom into core and modules. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 6 years, 6 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: Source/bindings/v8/custom/V8ClientCustom.cpp
diff --git a/Source/bindings/v8/custom/V8ClientCustom.cpp b/Source/bindings/v8/custom/V8ClientCustom.cpp
deleted file mode 100644
index b797575951105989b788544e639d8faf8195e838..0000000000000000000000000000000000000000
--- a/Source/bindings/v8/custom/V8ClientCustom.cpp
+++ /dev/null
@@ -1,39 +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.
-
-#include "config.h"
-#include "bindings/modules/v8/V8Client.h"
-
-#include "bindings/v8/ExceptionMessages.h"
-#include "bindings/v8/ExceptionState.h"
-#include "bindings/v8/SerializedScriptValue.h"
-#include "bindings/v8/V8Binding.h"
-#include "core/dom/MessagePort.h"
-#include "modules/serviceworkers/ServiceWorker.h"
-#include "wtf/ArrayBuffer.h"
-
-namespace WebCore {
-
-void V8Client::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage", "ServiceWorker", info.Holder(), info.GetIsolate());
- Client* client = V8Client::toNative(info.Holder());
- 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;
- ExecutionContext* context = currentExecutionContext(info.GetIsolate());
- client->postMessage(context, message.release(), &ports, exceptionState);
- exceptionState.throwIfNeeded();
-}
-
-} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp ('k') | Source/bindings/v8/custom/V8CryptoCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698