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

Unified Diff: third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_js_generator.py

Issue 883843002: Update mojo sdk to rev 126532ce21c5c3c55a1e1693731411cb60169efd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 5 years, 11 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/mojo/src/mojo/public/tools/bindings/generators/mojom_js_generator.py
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_js_generator.py b/third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_js_generator.py
index 7aaeaa28f02e2a80965112184ee793feb438f88b..fd1407e6ee1b9d4cb98075d6b543a613c16d9c79 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_js_generator.py
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_js_generator.py
@@ -223,30 +223,30 @@ def JavaScriptValidateHandleParams(packed_field):
return "%s, %s" % (field_offset, nullable)
-
-
def JavaScriptProxyMethodParameterValue(parameter):
name = parameter.name;
if (IsInterfaceParameter(parameter)):
type = JavaScriptType(parameter.kind)
- return "core.isHandle(%s) ? %s : connection.bindProxyClient" \
- "(%s, %s, %s.client)" % (name, name, name, type, type)
+ return "core.isHandle(%s) ? %s : connection.bindImpl" \
+ "(%s, %s)" % (name, name, name, type)
if (IsInterfaceRequestParameter(parameter)):
type = JavaScriptType(parameter.kind.kind)
- return "core.isHandle(%s) ? %s : connection.bindProxyClient" \
- "(%s, %s.client, %s)" % (name, name, name, type, type)
+ return "core.isHandle(%s) ? %s : connection.bindProxy" \
+ "(%s, %s)" % (name, name, name, type)
return name;
+
def JavaScriptStubMethodParameterValue(parameter):
name = parameter.name;
if (IsInterfaceParameter(parameter)):
type = JavaScriptType(parameter.kind)
- return "connection.bindProxyHandle(%s, %s.client, %s)" % (name, type, type)
+ return "connection.bindHandleToProxy(%s, %s)" % (name, type)
if (IsInterfaceRequestParameter(parameter)):
type = JavaScriptType(parameter.kind.kind)
- return "connection.bindProxyHandle(%s, %s, %s.client)" % (name, type, type)
+ return "connection.bindHandleToStub(%s, %s)" % (name, type)
return name;
+
def TranslateConstants(token):
if isinstance(token, (mojom.EnumValue, mojom.NamedValue)):
# Both variable and enum constants are constructed like:

Powered by Google App Engine
This is Rietveld 408576698