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

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

Issue 2405093003: [WIP] Mojo native bindings interface.
Patch Set: cleanup 2 Created 4 years, 2 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: mojo/public/tools/bindings/generators/mojom_js_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_js_generator.py b/mojo/public/tools/bindings/generators/mojom_js_generator.py
index 3900e50d3fd12119d795b785335b4a8b9766d17c..6450954614e8fadd6068a5d47194d070054f759d 100644
--- a/mojo/public/tools/bindings/generators/mojom_js_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_js_generator.py
@@ -275,11 +275,11 @@ def JavaScriptProxyMethodParameterValue(parameter):
name = parameter.name;
if (mojom.IsInterfaceKind(parameter.kind)):
type = JavaScriptType(parameter.kind)
- return "core.isHandle(%s) ? %s : connection.bindImpl" \
+ return "%s instanceof MojoHandle ? %s : connection.bindImpl" \
"(%s, %s)" % (name, name, name, type)
if (mojom.IsInterfaceRequestKind(parameter.kind)):
type = JavaScriptType(parameter.kind.kind)
- return "core.isHandle(%s) ? %s : connection.bindProxy" \
+ return "%s instanceof MojoHandle ? %s : connection.bindProxy" \
"(%s, %s)" % (name, name, name, type)
return name;

Powered by Google App Engine
This is Rietveld 408576698