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

Unified Diff: remoting/webapp/crd/js/cast_extension_handler.js

Issue 1015553003: Added more typechecking functions and unit tests for existing code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: remoting/webapp/crd/js/cast_extension_handler.js
diff --git a/remoting/webapp/crd/js/cast_extension_handler.js b/remoting/webapp/crd/js/cast_extension_handler.js
index ab0bde22b41e3608392412a092c88e1763400bae..669a2b0ab76dd316aaee1e2e6909fff17feebb4b 100644
--- a/remoting/webapp/crd/js/cast_extension_handler.js
+++ b/remoting/webapp/crd/js/cast_extension_handler.js
@@ -93,7 +93,7 @@ remoting.CastExtensionHandler.prototype.start = function(sendMessageToHost) {
* @param {string} msgString The extension message's data.
*/
remoting.CastExtensionHandler.prototype.onMessage = function(msgString) {
- var message = getJsonObjectFromString(msgString);
+ var message = base.getJsonObjectFromString(msgString);
// Save messages to send after a session is established.
this.messageQueue_.push(message);
@@ -243,7 +243,7 @@ remoting.CastExtensionHandler.prototype.chromotingMessageListener =
function(ns, message) {
if (ns === this.kCastNamespace_) {
try {
- var messageObj = getJsonObjectFromString(message);
+ var messageObj = base.getJsonObjectFromString(message);
this.sendMessageToHost_(messageObj);
} catch (err) {
console.error('Failed to process message from Cast device.');

Powered by Google App Engine
This is Rietveld 408576698