Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: composer.js

Issue 29632569: Issue 6113 - Improve reliability of "block element" dialog (Closed)
Patch Set: Simplify response checking logic Created Dec. 12, 2017, 12:31 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/filterComposer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: composer.js
diff --git a/composer.js b/composer.js
index e45c948e153387e7a0140f94862c9809c92bc5f6..0c4571e226558a62a3b619ae19e44ce9dd0ab7d4 100644
--- a/composer.js
+++ b/composer.js
@@ -100,6 +100,15 @@ function init()
filtersTextArea.value = msg.filters.join("\n");
filtersTextArea.disabled = false;
$("#addButton").button("option", "disabled", false);
+
+ // Firefox sometimes tells us this window had loaded before it has[1],
+ // to work around that we send the "composer.dialog.init" message again
+ // when sending failed. Unfortunately sometimes sending is reported as
+ // successful when it's not, but with the response of `undefined`. We
+ // therefore send a response here, and check for it to see if the
+ // message really was sent successfully.
+ // [1] - https://bugzilla.mozilla.org/show_bug.cgi?id=1418655
+ sendResponse(true);
break;
case "composer.dialog.close":
closeMe();
« no previous file with comments | « no previous file | lib/filterComposer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld