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

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: 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
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..77fd9f56270be59006c23f4397f5eead06f8d873 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()
+{
+ return m_arrayBufferContentsArray && !m_arrayBufferContentsArray->isEmpty();
+}
+
SerializedScriptValue::~SerializedScriptValue()
{
// If the allocated memory was not registered before, then this class is likely

Powered by Google App Engine
This is Rietveld 408576698