Index: Source/bindings/v8/custom/V8WorkerCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8WorkerCustom.cpp b/Source/bindings/v8/custom/V8WorkerCustom.cpp |
index d4d6a9f9c3caa39646cadc2aa2b036f4ddcb994a..2a5b62632ca81cb5632f80ca201c7127aef1298f 100644 |
--- a/Source/bindings/v8/custom/V8WorkerCustom.cpp |
+++ b/Source/bindings/v8/custom/V8WorkerCustom.cpp |
@@ -48,10 +48,11 @@ void V8Worker::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value> |
MessagePortArray ports; |
ArrayBufferArray arrayBuffers; |
if (args.Length() > 1) { |
+ const int transferablesArgIndex = 1; |
bool notASequence = false; |
- if (!extractTransferables(args[1], ports, arrayBuffers, notASequence, args.GetIsolate())) { |
+ if (!extractTransferables(args[transferablesArgIndex], ports, arrayBuffers, notASequence, args.GetIsolate())) { |
if (notASequence) |
- throwTypeError(ExceptionMessages::failedToExecute("postMessage", "Worker", ExceptionMessages::notASequenceType("Second")), args.GetIsolate()); |
+ throwTypeError(ExceptionMessages::failedToExecute("postMessage", "Worker", ExceptionMessages::notASequenceTypeArgumentOrValue(transferablesArgIndex + 1)), args.GetIsolate()); |
return; |
} |
} |