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

Unified Diff: Source/bindings/core/v8/SerializedScriptValue.cpp

Issue 1301953002: WebMessaging: Show a warning when MessagePort attempts to send a transferable ArrayBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add const / update test expectation 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/bindings/core/v8/SerializedScriptValue.h ('k') | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/SerializedScriptValue.cpp
diff --git a/Source/bindings/core/v8/SerializedScriptValue.cpp b/Source/bindings/core/v8/SerializedScriptValue.cpp
index d5cc1368b1d0a47a6d94f6b9b0f5076f008a8233..bc1e32f4a090fdb4f9d5092eab00f52cbc79609f 100644
--- a/Source/bindings/core/v8/SerializedScriptValue.cpp
+++ b/Source/bindings/core/v8/SerializedScriptValue.cpp
@@ -238,6 +238,11 @@ void SerializedScriptValue::registerMemoryAllocatedWithCurrentScriptContext()
v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(m_externallyAllocatedMemory);
}
+bool SerializedScriptValue::containsTransferableArrayBuffer() const
+{
+ return m_arrayBufferContentsArray && !m_arrayBufferContentsArray->isEmpty();
+}
+
SerializedScriptValue::~SerializedScriptValue()
{
// If the allocated memory was not registered before, then this class is likely
« no previous file with comments | « Source/bindings/core/v8/SerializedScriptValue.h ('k') | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698