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

Unified Diff: third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py

Issue 2733093003: DevTools: instrument user callbacks based on generic probes, remove NativeBreakpoint. (Closed)
Patch Set: test fixed Created 3 years, 9 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: third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py
diff --git a/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py b/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py
index 88bc277e1302386bd70ed7c93fab23e238f1586c..b92887b3c1c357f8da6ba4e15bb3f0ca0cb19716 100755
--- a/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py
+++ b/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py
@@ -269,7 +269,7 @@ class Method:
return self.return_type == ""
def generate_header(self, header_lines):
- param_list = ", ".join(map(Parameter.to_str_class, self.params))
+ param_list = ", ".join(map(Parameter.to_str_class_and_value, self.params))
if self.is_scoped():
member_list = "\n".join(map(generate_member_decl, self.params))
header_lines.append(template_scoped_decl.substitute(
@@ -401,6 +401,11 @@ class Parameter:
def to_str_class_and_name(self):
return "%s %s" % (self.type, self.name)
+ def to_str_class_and_value(self):
+ if self.default_value:
+ return "%s = %s" % (self.to_str_class(), self.default_value)
+ return self.to_str_class()
+
def to_str_class(self):
return self.type

Powered by Google App Engine
This is Rietveld 408576698