[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

loislo at chromium.org loislo at chromium.org
Wed Dec 22 12:38:31 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 7d458a9ce07d68c791cce3e2b4c577cfc4567d87
Author: loislo at chromium.org <loislo at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 26 14:14:27 2010 +0000

    2010-08-26  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            WebInspector: It would be better to have an explicit type check for the all
            arguments of InspectorBackend functions on front-end side.
            https://bugs.webkit.org/show_bug.cgi?id=44684
    
            * inspector/CodeGeneratorInspector.pm:
    
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66101 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ec329b8..1cfdd03 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,16 @@
 
         Reviewed by Yury Semikhatsky.
 
+        WebInspector: It would be better to have an explicit type check for the all
+        arguments of InspectorBackend functions on front-end side.
+        https://bugs.webkit.org/show_bug.cgi?id=44684
+
+        * inspector/CodeGeneratorInspector.pm:
+
+2010-08-26  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
         WebInspector: It would be better to rename setBool, pushBool and asBool accessors
         to setBoolean, pushBoolean and asBoolean for better matching with the results of
         JS typeof operator.
diff --git a/WebCore/inspector/CodeGeneratorInspector.pm b/WebCore/inspector/CodeGeneratorInspector.pm
index 09af305..bc650ba 100644
--- a/WebCore/inspector/CodeGeneratorInspector.pm
+++ b/WebCore/inspector/CodeGeneratorInspector.pm
@@ -502,7 +502,7 @@ sub generateBackendStubJS
     foreach my $function (@backendFunctions) {
         my $name = $function->signature->name;
         my $domain = $function->signature->extendedAttributes->{"handler"};
-        my $argumentNames = join(",", map("\"" . $_->name . "\": null", grep($_->direction eq "in", @{$function->parameters})));
+        my $argumentNames = join(",", map("\"" . $_->name . "\": \"" . lc($typeTransform{$_->type}->{"JSONType"}) . "\"", grep($_->direction eq "in", @{$function->parameters})));
         push(@JSStubs, "    this._registerDelegate('{" .
             "\"seq\": 0, " .
             "\"domain\": \"$domain\", " .
@@ -532,8 +532,12 @@ WebInspector.InspectorBackendStub.prototype = {
         var args = Array.prototype.slice.call(arguments);
         var request = JSON.parse(args.shift());
 
-        for (var key in request.arguments)
-            request.arguments[key] = args.shift();
+        for (var key in request.arguments) {
+            var value = args.shift();
+            if (typeof value !== request.arguments[key])
+                throw("Invalid type of property " + key + ". It should be '" + request.arguments[key] + "' but it is '" + typeof value + "'." );
+            request.arguments[key] = value;
+        }
 
         if (args.length === 1 && typeof args[0] === "function")
             request.seq = WebInspector.Callback.wrap(args[0]);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list