https://bugs.webkit.org/show_bug.cgi?id=77967
Patch by Peter Rybin <peter.rybin@gmail.com> 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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107091
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-08 Peter Rybin <peter.rybin@gmail.com>
+
+ 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 <yurys@chromium.org>
Web Inspector: inspected object wrapper should be released by InjectedScript when popover closes
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