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

Unified Diff: mojo/public/js/connection.js

Issue 1951723002: Use the Mojo StubBindings interface correctly in WebUSB LayoutTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 7 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 | « mojo/public/js/bindings.js ('k') | third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/connection.js
diff --git a/mojo/public/js/connection.js b/mojo/public/js/connection.js
index 62e8798fb2d736fea2d68e075aba818ff6df92ca..413ccb3cce6668fb84ffe4bb183d8191133952d4 100644
--- a/mojo/public/js/connection.js
+++ b/mojo/public/js/connection.js
@@ -25,6 +25,11 @@ define("mojo/public/js/connection", [
this.remote = remoteProxy;
this.router_.setIncomingReceiver(localStub);
+ this.router_.setErrorHandler(() => {
+ if (StubBindings(this.local) &&
+ StubBindings(this.local).connectionErrorHandler)
+ StubBindings(this.local).connectionErrorHandler();
+ });
if (this.remote)
this.remote.receiver_ = router;
« no previous file with comments | « mojo/public/js/bindings.js ('k') | third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698