From 776dc97437fba0696217aabc638c302379a5808d Mon Sep 17 00:00:00 2001 From: Joe Savona Date: Wed, 1 Jul 2015 04:51:33 -0700 Subject: [PATCH] InteractionManager: remove dev timeout warnings --- Libraries/Interaction/InteractionManager.js | 28 --------------------- 1 file changed, 28 deletions(-) diff --git a/Libraries/Interaction/InteractionManager.js b/Libraries/Interaction/InteractionManager.js index 098dfcee9..37625978a 100644 --- a/Libraries/Interaction/InteractionManager.js +++ b/Libraries/Interaction/InteractionManager.js @@ -21,11 +21,6 @@ var setImmediate = require('setImmediate'); type Handle = number; -/** - * Maximum time a handle can be open before warning in DEV. - */ -var DEV_TIMEOUT = 2000; - var _emitter = new EventEmitter(); var _interactionSet = new Set(); var _addInteractionSet = new Set(); @@ -94,14 +89,6 @@ var InteractionManager = { scheduleUpdate(); var handle = ++_inc; _addInteractionSet.add(handle); - if (__DEV__) { - // Capture the stack trace of what created the handle. - var error = new Error( - 'InteractionManager: interaction handle not cleared within ' + - DEV_TIMEOUT + ' ms.' - ); - setDevTimeoutHandle(handle, error, DEV_TIMEOUT); - } return handle; }, @@ -166,19 +153,4 @@ function processUpdate() { _deleteInteractionSet.clear(); } -/** - * Wait until `timeout` has passed and warn if the handle has not been cleared. - */ -function setDevTimeoutHandle( - handle: Handle, - error: Error, - timeout: number -): void { - setTimeout(() => { - if (_interactionSet.has(handle)) { - console.warn(error.message + '\n' + error.stack); - } - }, timeout); -} - module.exports = InteractionManager;