Commit 2e7fbc6d authored by wangjimmy's avatar wangjimmy Committed by Commit bot

Add encounteredError() to AssociatedInterfacePtrController.

Indicates whether an error has been encountered by the interface endpoint client. If true, method calls made on this interface will be dropped (and may already have been dropped).

BUG=695635

Review-Url: https://codereview.chromium.org/2840333002
Cr-Commit-Position: refs/heads/master@{#467869}
parent 201eaf7d
...@@ -116,6 +116,13 @@ define("mojo/public/js/associated_bindings", [ ...@@ -116,6 +116,13 @@ define("mojo/public/js/associated_bindings", [
this.reset(); this.reset();
}; };
// Indicates whether an error has been encountered. If true, method calls
// on this interface will be dropped (and may already have been dropped).
AssociatedInterfacePtrController.prototype.getEncounteredError = function() {
return this.interfaceEndpointClient_ ?
this.interfaceEndpointClient_.getEncounteredError() : false;
};
AssociatedInterfacePtrController.prototype.setConnectionErrorHandler = AssociatedInterfacePtrController.prototype.setConnectionErrorHandler =
function(callback) { function(callback) {
if (!this.isBound()) { if (!this.isBound()) {
......
...@@ -232,6 +232,10 @@ define("mojo/public/js/lib/interface_endpoint_client", [ ...@@ -232,6 +232,10 @@ define("mojo/public/js/lib/interface_endpoint_client", [
this.controlMessageProxy_.requireVersion(version); this.controlMessageProxy_.requireVersion(version);
}; };
InterfaceEndpointClient.prototype.getEncounteredError = function() {
return this.encounteredError_;
};
var exports = {}; var exports = {};
exports.InterfaceEndpointClient = InterfaceEndpointClient; exports.InterfaceEndpointClient = InterfaceEndpointClient;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment