Chromium Code Reviews| Index: Source/bindings/v8/custom/V8WorkerCustom.cpp |
| diff --git a/Source/bindings/v8/custom/V8WorkerCustom.cpp b/Source/bindings/v8/custom/V8WorkerCustom.cpp |
| index 01bcdd8dc9bb0c5fe510597043eb5807ab42393d..dd5bfd94dfe2a50a4644d30b47f2769765aa2db5 100644 |
| --- a/Source/bindings/v8/custom/V8WorkerCustom.cpp |
| +++ b/Source/bindings/v8/custom/V8WorkerCustom.cpp |
| @@ -31,6 +31,7 @@ |
| #include "config.h" |
| #include "V8Worker.h" |
| +#include "bindings/v8/ExceptionMessages.h" |
| #include "bindings/v8/ExceptionState.h" |
| #include "bindings/v8/SerializedScriptValue.h" |
| #include "bindings/v8/V8Binding.h" |
| @@ -47,8 +48,15 @@ void V8Worker::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value> |
| 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: line breaks.
|
| + if (notASequence) { |
| + throwTypeError(ExceptionMessages::failedToExecute( |
|
Mike West
2013/10/22 06:50:40
Nit: line breaks.
|
| + "postMessage", "Worker", ExceptionMessages::notASequenceType("Second")), args.GetIsolate()); |
| + } |
| return; |
| + } |
| } |
| bool didThrow = false; |
| RefPtr<SerializedScriptValue> message = |