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

Unified Diff: sky/framework/inspector/inspector.sky

Issue 746453002: Don't send duplicate responses for debugger commands in Sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/inspector/inspector.sky
diff --git a/sky/framework/inspector/inspector.sky b/sky/framework/inspector/inspector.sky
index 67d34d05b9712b0b014253342bc9d89bc76295b4..b87ff75f98576b81e596fec2b2fb59bd5b253ca4 100644
--- a/sky/framework/inspector/inspector.sky
+++ b/sky/framework/inspector/inspector.sky
@@ -29,6 +29,7 @@ function InspectorBackend(frontend) {
InspectorBackend.prototype = Object.create(
inspector.InspectorBackend.stubClass.prototype);
+InspectorBackend.prototype.IMPLEMENTED_IN_CPP = "IMPLEMENTED_IN_CPP";
InspectorBackend.prototype.ASYNC_RESPONSE = "ASYNC_RESPONSE";
InspectorBackend.prototype.MESSAGE_TIMEOUT_MS = 30000;
@@ -53,7 +54,7 @@ InspectorBackend.prototype.dispatch_ = function(descriptor, params, message_id)
// Debugger is implemented in c++.
if (agentName == "Debugger")
- return;
+ return this.IMPLEMENTED_IN_CPP;
if (!(agentName in this.agents)) {
this.logMissing_(agentName);
@@ -77,6 +78,8 @@ InspectorBackend.prototype.dispatch_ = function(descriptor, params, message_id)
InspectorBackend.prototype.onMessage = function(data) {
var message = JSON.parse(data);
var result = this.dispatch_(message.method, message.params, message.id);
+ if (result === this.IMPLEMENTED_IN_CPP)
+ return;
this.unansweredMessages_.push(message.id);
// FIXME: This magic return value is kinda hacky.
if (result != this.ASYNC_RESPONSE)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698