2010-07-23 Pavel Feldman <pfeldman@chromium.org>
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jul 2010 13:19:18 +0000 (13:19 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jul 2010 13:19:18 +0000 (13:19 +0000)
        Not reviewed: Chromium tests fix.

        * inspector/CodeGeneratorInspector.pm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/inspector/CodeGeneratorInspector.pm

index 0180357..e3569ee 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-23  Pavel Feldman  <pfeldman@chromium.org>
+
+        Not reviewed: Chromium tests fix.
+
+        * inspector/CodeGeneratorInspector.pm:
+
 2010-07-23  Patrick Gansterer  <paroga@paroga.com>
 
         Reviewed by Adam Roben.
 2010-07-23  Patrick Gansterer  <paroga@paroga.com>
 
         Reviewed by Adam Roben.
index 17c1f64..f554026 100644 (file)
@@ -259,8 +259,9 @@ sub generateBackendFunction
     push(@function, "{");
     my $i = 1; # zero element is the method name.
     my $expectedParametersCount = scalar(@argsFiltered);
     push(@function, "{");
     my $i = 1; # zero element is the method name.
     my $expectedParametersCount = scalar(@argsFiltered);
-    push(@function, "    if (args->length() != $expectedParametersCount) {");
-    push(@function, "        *exception = formatWrongArgumentsCountMessage(args->length(), $expectedParametersCount);");
+    my $expectedParametersCountWithMethodName = scalar(@argsFiltered) + 1;
+    push(@function, "    if (args->length() != $expectedParametersCountWithMethodName) {");
+    push(@function, "        *exception = formatWrongArgumentsCountMessage(args->length() - 1, $expectedParametersCount);");
     push(@function, "        ASSERT_NOT_REACHED();");
     push(@function, "        return;");
     push(@function, "    }");
     push(@function, "        ASSERT_NOT_REACHED();");
     push(@function, "        return;");
     push(@function, "    }");