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 1525e7d224605b8c5445ab71c4f42f90bd8139c1..f9a41e92204b3988d0e66201247fe9e9a32f528f 100644 |
--- a/ios/web/web_state/js/resources/message.js |
+++ b/ios/web/web_state/js/resources/message.js |
@@ -17,23 +17,6 @@ __gCrWeb.message = {}; |
(function() { |
/** |
* Object to manage queue of messages waiting to be sent to the main |
- * application for immediate processing. |
- * @type {Object} |
- * @private |
- */ |
- var immediateMessageQueue_ = { |
- scheme: 'crwebinvokeimmediate', |
- reset: function() { |
- immediateMessageQueue_.queue = []; |
- // Since the array will be JSON serialized, protect against non-standard |
- // custom versions of Array.prototype.toJSON. |
- immediateMessageQueue_.queue.toJSON = null; |
- } |
- }; |
- immediateMessageQueue_.reset(); |
- |
- /** |
- * Object to manage queue of messages waiting to be sent to the main |
* application for asynchronous processing. |
* @type {Object} |
* @private |
@@ -50,32 +33,11 @@ __gCrWeb.message = {}; |
messageQueue_.reset(); |
/** |
- * Invokes a command immediately on the Objective-C side. |
- * An immediate command is a special class of command that must be handled at |
- * the earliest opportunity. See the notes in CRWWebController for |
- * restrictions and precautions. |
- * @param {Object} command The command in a JavaScript object. |
- * @private |
- */ |
- __gCrWeb.message.invokeOnHostImmediate = function(command) { |
- // If there is no document or body, the command will be silently dropped. |
- if (!document || !document.body) |
- return; |
- immediateMessageQueue_.queue.push(command); |
- sendQueue_(immediateMessageQueue_); |
- }; |
- |
- /** |
* Invokes a command on the Objective-C side. |
* @param {Object} command The command in a JavaScript object. |
* @private |
*/ |
__gCrWeb.message.invokeOnHost = function(command) { |
- // Avoid infinite loops in sites that send messages as a side effect |
- // of URL verification (e.g., due to logging in an XHR override). |
- if (window.__gCrWeb_Verifying) { |
- return; |
- } |
messageQueue_.queue.push(command); |
sendQueue_(messageQueue_); |
}; |
@@ -94,8 +56,6 @@ __gCrWeb.message = {}; |
* Sends both queues if they contain messages. |
*/ |
__gCrWeb.message.invokeQueues = function() { |
- if (immediateMessageQueue_.queue.length > 0) |
- sendQueue_(immediateMessageQueue_); |
if (messageQueue_.queue.length > 0) |
sendQueue_(messageQueue_); |
}; |