Support passing a collection of native modules to JSContext

Reviewed By: javache

Differential Revision: D4772649

fbshipit-source-id: dd9353edb0c2c013a3b7fe772231db12cdd8cdae
This commit is contained in:
Marc Horowitz 2017-03-31 00:46:14 -07:00 committed by Facebook Github Bot
parent 0b2ac0ada8
commit 1916b38a65
2 changed files with 4 additions and 3 deletions

View File

@ -182,10 +182,11 @@ class MessageQueue {
const now = new Date().getTime();
if (global.nativeFlushQueueImmediate &&
(now - this._lastFlush >= MIN_TIME_BETWEEN_FLUSHES_MS ||
this._inCall === 0)) {
global.nativeFlushQueueImmediate(this._queue);
this._inCall === 0)) {
var queue = this._queue;
this._queue = [[], [], [], this._callID];
this._lastFlush = now;
global.nativeFlushQueueImmediate(queue);
}
Systrace.counterEvent('pending_js_to_native_queue', this._queue[0].length);
if (__DEV__ && this.__spy && isFinite(moduleID)) {

View File

@ -6,6 +6,7 @@ android_library(
exported_deps = [
react_native_dep("java/com/facebook/jni:jni"),
react_native_dep("java/com/facebook/proguard/annotations:annotations"),
react_native_target("java/com/facebook/react/bridge:bridge"),
],
proguard_config = "bridge.pro",
visibility = [
@ -26,7 +27,6 @@ android_library(
# '//native/react/jni:jni-internal',
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/react/bridge:bridge"),
react_native_target("java/com/facebook/react/common:common"),
react_native_target("java/com/facebook/react/devsupport:devsupport"),
react_native_target("java/com/facebook/react/module/model:model"),