Remove exported constants from RCTTimers to allow lazy initialization

Summary:
As per javache comments in #8734.

Also removes now useless feature detection check.

**Test plan**
Tested that rIC still works in UIExplorer example.
Closes https://github.com/facebook/react-native/pull/8795

Differential Revision: D3572566

Pulled By: javache

fbshipit-source-id: 261d13d8b03898313f8b4184d634c70f81a61b62
This commit is contained in:
Janic Duplessis
2016-07-15 13:57:19 -07:00
committed by Facebook Github Bot 4
parent f067811cd2
commit 80872ffccd
4 changed files with 10 additions and 23 deletions

View File

@@ -101,11 +101,6 @@ var JSTimers = {
* with time remaining in frame.
*/
requestIdleCallback: function(func) {
if (!RCTTiming.setSendIdleEvents) {
console.warn('requestIdleCallback is not currently supported on this platform');
return requestAnimationFrame(func);
}
if (JSTimersExecution.requestIdleCallbacks.length === 0) {
RCTTiming.setSendIdleEvents(true);
}