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

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

Issue 2744963002: Introduce InterfaceEndpointClient(IEC), InterfaceEndpointHandle and (Closed)
Patch Set: Throw the error with the string being the stack trace needed to debug layouts which don't output an… Created 3 years, 9 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/codec.js ('k') | mojo/public/js/constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/connector.js
diff --git a/mojo/public/js/connector.js b/mojo/public/js/connector.js
index 4d0627865337f19e231d69306e088054fe9ea36b..012e3c7c07b46b12d6490701c20144a4641a9277 100644
--- a/mojo/public/js/connector.js
+++ b/mojo/public/js/connector.js
@@ -78,10 +78,6 @@ define("mojo/public/js/connector", [
this.errorHandler_ = handler;
};
- Connector.prototype.encounteredError = function() {
- return this.error_;
- };
-
Connector.prototype.waitForNextMessageForTesting = function() {
var wait = core.wait(this.handle_, core.HANDLE_SIGNAL_READABLE);
this.readMore_(wait.result);
@@ -96,9 +92,12 @@ define("mojo/public/js/connector", [
if (read.result == core.RESULT_SHOULD_WAIT)
return;
if (read.result != core.RESULT_OK) {
+ // TODO(wangjimmy): Add a handleError method to swap the handle to be
+ // closed with a dummy handle in the case when
+ // read.result != MOJO_RESULT_FAILED_PRECONDITION
this.error_ = true;
if (this.errorHandler_)
- this.errorHandler_.onError(read.result);
+ this.errorHandler_.onError();
return;
}
var messageBuffer = new buffer.Buffer(read.buffer);
« no previous file with comments | « mojo/public/js/codec.js ('k') | mojo/public/js/constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698