From d4d515cdc34858ba2c41353184ed83f7922033c0 Mon Sep 17 00:00:00 2001 From: Riley Dulin Date: Thu, 10 May 2018 10:45:36 -0700 Subject: [PATCH] MessageQueue not initializing inCall Reviewed By: yungsters Differential Revision: D7898700 fbshipit-source-id: c2b4d6e75e7f5871cd40b00bd173e6f1a929b26a --- Libraries/BatchedBridge/MessageQueue.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Libraries/BatchedBridge/MessageQueue.js b/Libraries/BatchedBridge/MessageQueue.js index 93a759154..a5208d81b 100644 --- a/Libraries/BatchedBridge/MessageQueue.js +++ b/Libraries/BatchedBridge/MessageQueue.js @@ -46,7 +46,6 @@ class MessageQueue { _successCallbacks: {[key: number]: ?Function}; _failureCallbacks: {[key: number]: ?Function}; _callID: number; - _inCall: number; _lastFlush: number; _eventLoopStartTime: number; @@ -248,8 +247,7 @@ class MessageQueue { const now = new Date().getTime(); if ( global.nativeFlushQueueImmediate && - (now - this._lastFlush >= MIN_TIME_BETWEEN_FLUSHES_MS || - this._inCall === 0) + now - this._lastFlush >= MIN_TIME_BETWEEN_FLUSHES_MS ) { var queue = this._queue; this._queue = [[], [], [], this._callID]; @@ -286,7 +284,6 @@ class MessageQueue { */ __guard(fn: () => void) { - this._inCall++; if (this.__shouldPauseOnThrow()) { fn(); } else { @@ -296,7 +293,6 @@ class MessageQueue { ErrorUtils.reportFatalError(error); } } - this._inCall--; } // MessageQueue installs a global handler to catch all exceptions where JS users can register their own behavior