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

Unified Diff: core/inspector/CodeGeneratorInstrumentation.py

Issue 959933002: Move IDLs to 39 roll (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
Patch Set: Created 5 years, 10 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 | « core/inspector/CodeGeneratorInspectorStrings.py ('k') | core/inspector/InjectedScriptHost.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/inspector/CodeGeneratorInstrumentation.py
diff --git a/core/inspector/CodeGeneratorInstrumentation.py b/core/inspector/CodeGeneratorInstrumentation.py
index aa0335e6bc24b57d2c3cfb493dfb1b2bbfdc89ad..54e5ce8a4359084ecf615103864ac672b957d494 100755
--- a/core/inspector/CodeGeneratorInstrumentation.py
+++ b/core/inspector/CodeGeneratorInstrumentation.py
@@ -324,7 +324,8 @@ class Method:
if len(self.agents) == 0:
return
- body_lines = map(self.generate_agent_call, self.agents)
+ body_lines = map(self.generate_ref_ptr, self.params)
+ body_lines += map(self.generate_agent_call, self.agents)
if self.returns_cookie:
if "Timeline" in self.agents:
@@ -371,6 +372,11 @@ class Method:
maybe_return=maybe_return,
params_agent=", ".join(map(Parameter.to_str_value, self.params_impl)[1:]))
+ def generate_ref_ptr(self, param):
+ if param.is_prp:
+ return "\n RefPtr<%s> %s = %s;" % (param.inner_type, param.value, param.name)
+ else:
+ return ""
class Parameter:
def __init__(self, source):
@@ -401,8 +407,12 @@ class Parameter:
self.name = generate_param_name(self.type)
if re.match("PassRefPtr<", param_decl):
- self.value = "%s.get()" % self.name
+ self.is_prp = True
+ self.value = self.name
+ self.name = "prp" + self.name[0].upper() + self.name[1:]
+ self.inner_type = re.match("PassRefPtr<(.+)>", param_decl).group(1)
else:
+ self.is_prp = False
self.value = self.name
« no previous file with comments | « core/inspector/CodeGeneratorInspectorStrings.py ('k') | core/inspector/InjectedScriptHost.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698