Title: [107091] trunk/Source/WebCore
Revision
107091
Author
[email protected]
Date
2012-02-08 08:17:20 -0800 (Wed, 08 Feb 2012)

Log Message

Web Inspector: Optional out arguments are not supported in the Web Inspector protocol, which breaks the implementation
https://bugs.webkit.org/show_bug.cgi?id=77967

Patch by Peter Rybin <[email protected]> on 2012-02-08
Reviewed by Yury Semikhatsky.

Condition for RefPtr-based types added. This is more-or-less a hack
and it's should be redone together with the switch to type-safe API.

* inspector/CodeGeneratorInspector.py:
(Generator.process_command):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107090 => 107091)


--- trunk/Source/WebCore/ChangeLog	2012-02-08 16:02:31 UTC (rev 107090)
+++ trunk/Source/WebCore/ChangeLog	2012-02-08 16:17:20 UTC (rev 107091)
@@ -1,3 +1,16 @@
+2012-02-08  Peter Rybin  <[email protected]>
+
+        Web Inspector: Optional out arguments are not supported in the Web Inspector protocol, which breaks the implementation
+        https://bugs.webkit.org/show_bug.cgi?id=77967
+
+        Reviewed by Yury Semikhatsky.
+
+        Condition for RefPtr-based types added. This is more-or-less a hack
+        and it's should be redone together with the switch to type-safe API.
+
+        * inspector/CodeGeneratorInspector.py:
+        (Generator.process_command):
+
 2012-02-07  Yury Semikhatsky  <[email protected]>
 
         Web Inspector: inspected object wrapper should be released by InjectedScript when popover closes

Modified: trunk/Source/WebCore/inspector/CodeGeneratorInspector.py (107090 => 107091)


--- trunk/Source/WebCore/inspector/CodeGeneratorInspector.py	2012-02-08 16:02:31 UTC (rev 107090)
+++ trunk/Source/WebCore/inspector/CodeGeneratorInspector.py	2012-02-08 16:17:20 UTC (rev 107091)
@@ -2682,8 +2682,9 @@
                 param = ", %sout_%s" % (raw_type.get_output_pass_model().get_argument_prefix(), json_return_name)
                 cook = "        result->set%s(\"%s\", out_%s);\n" % (setter_type, json_return_name, json_return_name)
                 if optional:
-                        # FIXME: support optional properly. Probably an additional output parameter should be in each case.
-                    if var_type.get_text() == "bool":
+                    # FIXME: support optional properly. Probably an additional output parameter should be in each case.
+                    # FIXME: refactor this condition; it's a hack now.
+                    if var_type.get_text() == "bool" or var_type.get_text().startswith("RefPtr<"):
                         cook = ("        if (out_%s)\n    " % json_return_name) + cook
                     else:
                         cook = "        // FIXME: support optional here.\n" + cook
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to