Index: Source/bindings/v8/custom/V8MessagePortCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8MessagePortCustom.cpp b/Source/bindings/v8/custom/V8MessagePortCustom.cpp |
index f78dd17211efcc6be29313c948ce8d3c217ec8bb..c381933d92b99177707474d4c6b84efa4281fc20 100644 |
--- a/Source/bindings/v8/custom/V8MessagePortCustom.cpp |
+++ b/Source/bindings/v8/custom/V8MessagePortCustom.cpp |
@@ -48,9 +48,10 @@ void V8MessagePort::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::V |
ArrayBufferArray arrayBufferArray; |
if (args.Length() > 1) { |
bool notASequence = false; |
- if (!extractTransferables(args[1], portArray, arrayBufferArray, notASequence, args.GetIsolate())) { |
+ const int transferablesArgIndex = 1; |
+ if (!extractTransferables(args[transferablesArgIndex], portArray, arrayBufferArray, notASequence, args.GetIsolate())) { |
if (notASequence) |
- throwTypeError(ExceptionMessages::failedToExecute("postMessage", "MessagePort", ExceptionMessages::notASequenceType("Second")), args.GetIsolate()); |
+ throwTypeError(ExceptionMessages::failedToExecute("postMessage", "MessagePort", ExceptionMessages::notASequenceTypeArgumentOrValue(transferablesArgIndex + 1)), args.GetIsolate()); |
return; |
} |
} |