Index: Source/bindings/v8/custom/V8DedicatedWorkerGlobalScopeCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8DedicatedWorkerGlobalScopeCustom.cpp b/Source/bindings/v8/custom/V8DedicatedWorkerGlobalScopeCustom.cpp |
index ffa25a147a0b9f0e3bbc5aef81f5d19e157e8cbb..4432d67a8f88602e51f2d29be1986e1ca4ff3f7c 100644 |
--- a/Source/bindings/v8/custom/V8DedicatedWorkerGlobalScopeCustom.cpp |
+++ b/Source/bindings/v8/custom/V8DedicatedWorkerGlobalScopeCustom.cpp |
@@ -31,6 +31,7 @@ |
#include "config.h" |
#include "V8DedicatedWorkerGlobalScope.h" |
+#include "bindings/v8/ExceptionMessages.h" |
#include "bindings/v8/ExceptionState.h" |
#include "bindings/v8/V8Binding.h" |
#include "bindings/v8/V8Utilities.h" |
@@ -46,8 +47,15 @@ void V8DedicatedWorkerGlobalScope::postMessageMethodCustom(const v8::FunctionCal |
MessagePortArray ports; |
ArrayBufferArray arrayBuffers; |
if (args.Length() > 1) { |
- if (!extractTransferables(args[1], ports, arrayBuffers, args.GetIsolate())) |
+ bool notASequence = false; |
+ if (!extractTransferables( |
+ args[1], ports, arrayBuffers, notASequence, args.GetIsolate())) { |
Mike West
2013/10/22 06:50:40
Nit: The line breaks here are strange. Generally s
sof
2013/10/22 16:06:56
Sorry, presubmit checks leading me to assume wrong
|
+ if (notASequence) { |
+ throwTypeError(ExceptionMessages::failedToExecute( |
+ "postMessage", "WorkerGlobalScope", ExceptionMessages::notASequenceType("Second")), args.GetIsolate()); |
Mike West
2013/10/22 06:50:40
Nit: line breaks.
|
+ } |
return; |
+ } |
} |
bool didThrow = false; |
RefPtr<SerializedScriptValue> message = |