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

Unified Diff: third_party/WebKit/Source/build/scripts/make_instrumenting_probes.py

Issue 2800853002: [instrumentation] Turn inspector override "probes" return values into output parameters. (Closed)
Patch Set: update BUILD.gn Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/InstrumentingProbesImpl.cpp.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/build/scripts/make_instrumenting_probes.py
diff --git a/third_party/WebKit/Source/build/scripts/make_instrumenting_probes.py b/third_party/WebKit/Source/build/scripts/make_instrumenting_probes.py
index ce1a23f4f4d3b7f3b78062489eee8a9e34fe2931..0b7105acdb14371a87b7029e78f42d37e1b9c486 100644
--- a/third_party/WebKit/Source/build/scripts/make_instrumenting_probes.py
+++ b/third_party/WebKit/Source/build/scripts/make_instrumenting_probes.py
@@ -124,20 +124,14 @@ class Method(object):
sys.stderr.write("Cannot parse %s\n" % source)
sys.exit(1)
- self.return_type = match.group(1) or ""
self.name = match.group(2)
- self.is_scoped = self.return_type == ""
+ self.is_scoped = not match.group(1)
+ if not self.is_scoped and match.group(1) != "void":
+ raise Exception("Instant probe must return void: %s" % self.name)
# Splitting parameters by a comma, assuming that attribute lists contain no more than one attribute.
self.params = map(Parameter, map(str.strip, match.group(3).split(",")))
- self.returns_value = self.return_type != "" and self.return_type != "void"
- if self.return_type == "bool":
- self.default_return_value = "false"
- elif self.returns_value:
- sys.stderr.write("Can only return bool: %s\n" % self.name)
- sys.exit(1)
-
class Parameter(object):
def __init__(self, source):
@@ -213,8 +207,6 @@ def build_observers():
for f in files:
for probe in f.declarations:
probe.agents = observers_by_probe[probe.name]
- if probe.returns_value and len(probe.agents) > 1:
- raise Exception("Can only return value from a single observer: %s\n" % probe.name)
return all_observers
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/InstrumentingProbesImpl.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698