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

Unified Diff: ios/web/web_state/js/resources/message.js

Issue 2449333002: [ios] Pass more --jscomp_error switches to the closure Compiler. (Closed)
Patch Set: Added back @public Created 4 years, 2 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 | « ios/web/web_state/js/resources/common.js ('k') | ios/web/web_state/js/resources/post_request.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/js/resources/message.js
diff --git a/ios/web/web_state/js/resources/message.js b/ios/web/web_state/js/resources/message.js
index 1649a64e98de39008a18df015a63653fffcf2b3e..47d32a78c24a6fb9bca96fc1a6531bf39584cc79 100644
--- a/ios/web/web_state/js/resources/message.js
+++ b/ios/web/web_state/js/resources/message.js
@@ -13,6 +13,11 @@ goog.require('__crWeb.common');
*/
__gCrWeb.message = {};
+// Store message namespace object in a global __gCrWeb object referenced by a
+// string, so it does not get renamed by closure compiler during the
+// minification.
+__gCrWeb['message'] = __gCrWeb.message;
+
/* Beginning of anonymous object. */
(function() {
/**
@@ -35,7 +40,7 @@ __gCrWeb.message = {};
/**
* Invokes a command on the Objective-C side.
* @param {Object} command The command in a JavaScript object.
- * @private
+ * @public
*/
__gCrWeb.message.invokeOnHost = function(command) {
messageQueue_.queue.push(command);
@@ -74,7 +79,7 @@ __gCrWeb.message = {};
queueObject.queue.forEach(function(command) {
var stringifiedMessage = __gCrWeb.common.JSONStringify({
"crwCommand": command,
- "crwWindowId": __gCrWeb.windowId
+ "crwWindowId": __gCrWeb['windowId']
});
// A web page can override |window.webkit| with any value. Deleting the
// object ensures that original and working implementation of
« no previous file with comments | « ios/web/web_state/js/resources/common.js ('k') | ios/web/web_state/js/resources/post_request.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698