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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerClient.cpp

Issue 1303823002: ServiceWorker: Show a warning when ServiceWorker(Client) attempts to send a transferable ArrayBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorker.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorkerClient.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerClient.cpp b/Source/modules/serviceworkers/ServiceWorkerClient.cpp
index 4aed29c2d162aa2de61fc51c72f5742d98bbf74c..c43de5cc25987dafabb099677dc1a9fdc3e7322a 100644
--- a/Source/modules/serviceworkers/ServiceWorkerClient.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerClient.cpp
@@ -8,6 +8,7 @@
#include "bindings/core/v8/CallbackPromiseAdapter.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/SerializedScriptValue.h"
+#include "core/inspector/ConsoleMessage.h"
#include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h"
#include "public/platform/WebString.h"
#include "wtf/RefPtr.h"
@@ -54,6 +55,9 @@ void ServiceWorkerClient::postMessage(ExecutionContext* context, PassRefPtr<Seri
if (exceptionState.hadException())
return;
+ if (message->containsTransferableArrayBuffer())
+ context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "ServiceWorkerClient cannot send an ArrayBuffer as a transferable object yet. See http://crbug.com/511119"));
+
WebString messageString = message->toWireString();
OwnPtr<WebMessagePortChannelArray> webChannels = MessagePort::toWebMessagePortChannelArray(channels.release());
ServiceWorkerGlobalScopeClient::from(context)->postMessageToClient(m_uuid, messageString, webChannels.release());
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698