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

Unified Diff: mojo/public/js/bindings.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
« no previous file with comments | « no previous file | mojo/public/js/connection.js » ('j') | third_party/WebKit/Source/modules/webusb/USB.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/bindings.js
diff --git a/mojo/public/js/bindings.js b/mojo/public/js/bindings.js
index 44aa9f4e9fed6529dbfa495db9712c939e01d38e..2fdcae39f30d17114602f3602299670eed5c1884 100644
--- a/mojo/public/js/bindings.js
+++ b/mojo/public/js/bindings.js
@@ -31,17 +31,8 @@ define("mojo/public/js/bindings", [
throw new Error("no stub object");
}
- function connectionHandle(connection) {
- return connection &&
- connection.router &&
- connection.router.connector_ &&
- connection.router.connector_.handle_;
- }
-
ProxyProperties.prototype.close = function() {
- var handle = connectionHandle(this.connection);
- if (handle)
- core.close(handle);
+ this.connection.close();
}
// Public stub class properties that are managed at runtime by the JS
@@ -51,9 +42,7 @@ define("mojo/public/js/bindings", [
}
StubProperties.prototype.close = function() {
- var handle = connectionHandle(this.connection);
- if (handle)
- core.close(handle);
+ this.connection.close();
}
// The base class for generated proxy classes.
@@ -125,4 +114,4 @@ define("mojo/public/js/bindings", [
exports.StubBase = StubBase;
exports.StubBindings = StubBindings;
return exports;
-});
+});
« no previous file with comments | « no previous file | mojo/public/js/connection.js » ('j') | third_party/WebKit/Source/modules/webusb/USB.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698