[ReactNative] Make JavaScript executors bridge modules

Summary:
@public

This is the first of a few diffs that change the way the executors are handled
by the bridge.

For they are just promoted to modules, so they are automatically loaded by the bridge.

Test Plan:
Tested on UIExplorer, Catalyst and MAdMan.
Tested all the 3 executors, everything looks fine.
This commit is contained in:
Tadeu Zagallo
2015-06-09 15:42:10 -07:00
parent 68bb3a7e71
commit 847dff8d75
9 changed files with 131 additions and 84 deletions

View File

@@ -133,8 +133,8 @@ RCT_EXPORT_MODULE();
(void)bridge;
}
// Sleep on the main thread so the deallocation can happen on the JS thread.
sleep(DEFAULT_TIMEOUT);
RUN_RUNLOOP_WHILE(weakExecutor, 1);
sleep(1);
XCTAssertNil(weakExecutor, @"JavaScriptExecutor should have been released");
}
@@ -151,7 +151,8 @@ RCT_EXPORT_MODULE();
(void)bridge;
}
sleep(DEFAULT_TIMEOUT);
RUN_RUNLOOP_WHILE(weakContext, 1);
sleep(1);
XCTAssertNil(weakContext, @"RCTJavaScriptContext should have been deallocated");
}