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

Unified Diff: Source/modules/serviceworkers/ServiceWorker.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 | « no previous file | Source/modules/serviceworkers/ServiceWorkerClient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorker.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorker.cpp b/Source/modules/serviceworkers/ServiceWorker.cpp
index 1c3ec165e64fb211caddf8e535764babaaaa6992..56d6050aeb4262bb16f28bce856cb604bb719c43 100644
--- a/Source/modules/serviceworkers/ServiceWorker.cpp
+++ b/Source/modules/serviceworkers/ServiceWorker.cpp
@@ -35,6 +35,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/dom/MessagePort.h"
#include "core/events/Event.h"
+#include "core/inspector/ConsoleMessage.h"
#include "modules/EventTargetModules.h"
#include "public/platform/WebMessagePortChannel.h"
#include "public/platform/WebString.h"
@@ -58,6 +59,9 @@ void ServiceWorker::postMessage(ExecutionContext* context, PassRefPtr<Serialized
return;
}
+ if (message->containsTransferableArrayBuffer())
+ context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "ServiceWorker 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());
m_outerWorker->postMessage(messageString, webChannels.leakPtr());
« no previous file with comments | « no previous file | Source/modules/serviceworkers/ServiceWorkerClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698