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

Unified Diff: options.js

Issue 29342814: Issue 4052 - Fix options page for old Chrome versions (Closed)
Patch Set: Created May 19, 2016, 12:43 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: options.js
diff --git a/options.js b/options.js
index d102d14bb83889fbe61a52dde8d621db0f6653ca..955ba7356a2744c9ceabf88aed6deb77f2fadd36 100644
--- a/options.js
+++ b/options.js
@@ -56,7 +56,12 @@ function wrapper(baseMessage /* , [paramKeys] */)
message[paramKeys[i]] = arguments[i];
}
- ext.backgroundPage.sendMessage(message, callback);
+ // Chrome 30 throws an exception when sendMessage is called with a callback
+ // parameter of undefined, so we work around that here. (See issue 4052)
+ if (callback)
+ ext.backgroundPage.sendMessage(message, callback);
+ else
+ ext.backgroundPage.sendMessage(message);
};
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld