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

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

Issue 383123009: DevTools: Support async call stacks for FileSystem API (part 1). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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: Source/core/inspector/CodeGeneratorInstrumentation.py
diff --git a/Source/core/inspector/CodeGeneratorInstrumentation.py b/Source/core/inspector/CodeGeneratorInstrumentation.py
index c31371766163373f9e931040a4b25fb3a24b68cd..7be51dbfa81dda485dab5aa1c982377757c8e30b 100755
--- a/Source/core/inspector/CodeGeneratorInstrumentation.py
+++ b/Source/core/inspector/CodeGeneratorInstrumentation.py
@@ -41,6 +41,8 @@ ${includes}
namespace WebCore {
+${forward_declarations}
+
namespace InspectorInstrumentation {
$methods
@@ -195,6 +197,7 @@ class File:
self.name = name
self.header_name = self.name + "Inl"
self.includes = [include_inspector_header("InspectorInstrumentation")]
+ self.forward_declarations = []
self.declarations = []
for line in map(str.strip, source.split("\n")):
line = re.sub("\s{2,}", " ", line).strip() # Collapse whitespace
@@ -202,9 +205,12 @@ class File:
continue
if line[0] == "#":
self.includes.append(line)
+ elif line.startswith("class "):
+ self.forward_declarations.append(line)
else:
self.declarations.append(Method(line))
self.includes.sort()
+ self.forward_declarations.sort()
def generate(self, cpp_lines, used_agents):
header_lines = []
@@ -217,6 +223,7 @@ class File:
return template_h.substitute(None,
file_name=self.header_name,
includes="\n".join(self.includes),
+ forward_declarations="\n".join(self.forward_declarations),
methods="\n".join(header_lines))

Powered by Google App Engine
This is Rietveld 408576698