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

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: Don't attempt to signal an error on a closed connection. Created 4 years, 8 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/js/connection.js
diff --git a/mojo/public/js/connection.js b/mojo/public/js/connection.js
index 62e8798fb2d736fea2d68e075aba818ff6df92ca..5e636fb997e5cdf3e27b78a96db79e05ecb01a68 100644
--- a/mojo/public/js/connection.js
+++ b/mojo/public/js/connection.js
@@ -25,6 +25,10 @@ define("mojo/public/js/connection", [
this.remote = remoteProxy;
this.router_.setIncomingReceiver(localStub);
+ this.router_.setErrorHandler(() => {
+ if (this.local && StubBindings(this.local).connectionErrorHandler)
+ StubBindings(this.local).connectionErrorHandler();
+ });
if (this.remote)
this.remote.receiver_ = router;

Powered by Google App Engine
This is Rietveld 408576698