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

Unified Diff: Source/bindings/v8/custom/V8MessageEventCustom.cpp

Issue 38063003: Improve TypeError messages from failed array conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve TypeError messages from failed array conversions. Created 7 years, 2 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/v8/custom/V8MessageEventCustom.cpp
diff --git a/Source/bindings/v8/custom/V8MessageEventCustom.cpp b/Source/bindings/v8/custom/V8MessageEventCustom.cpp
index 21c4f0e438a703721f63c368238681c3cd44a71c..3b7301ef63b29e3817e27b6676ad68ecbbc1d208 100644
--- a/Source/bindings/v8/custom/V8MessageEventCustom.cpp
+++ b/Source/bindings/v8/custom/V8MessageEventCustom.cpp
@@ -116,9 +116,10 @@ void V8MessageEvent::initMessageEventMethodCustom(const v8::FunctionCallbackInfo
}
OwnPtr<MessagePortArray> portArray;
- if (!isUndefinedOrNull(args[7])) {
+ const int portArrayIndex = 7;
+ if (!isUndefinedOrNull(args[portArrayIndex])) {
portArray = adoptPtr(new MessagePortArray);
- if (!getMessagePortArray(args[7], *portArray, args.GetIsolate()))
+ if (!getMessagePortArray(args[portArrayIndex], portArrayIndex + 1, *portArray, args.GetIsolate()))
return;
}
event->initMessageEvent(typeArg, canBubbleArg, cancelableArg, originArg, lastEventIdArg, sourceArg, portArray.release());
« no previous file with comments | « Source/bindings/v8/custom/V8DedicatedWorkerGlobalScopeCustom.cpp ('k') | Source/bindings/v8/custom/V8MessagePortCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698