[ReactNative] Preload ModuleData queue

Summary:
The module's methodQueue wasn't being created when accessing the modules directly
on the bridge, without going through JS. Preload the queue for now to fix internal
breakages, but I'll figure out a better way to keep it lazy afterwards.
This commit is contained in:
Tadeu Zagallo 2015-08-07 16:11:12 -01:00
parent 2d66e10ec4
commit 331e4a96e9
1 changed files with 4 additions and 0 deletions

View File

@ -305,6 +305,10 @@ id<RCTJavaScriptExecutor> RCTGetLatestExecutor(void)
for (RCTModuleData *moduleData in _moduleDataByID) {
config[moduleData.name] = moduleData.config;
// HACK(tadeu): Ensure the queue has been loaded, make it lazy later inside RCTModuleMap
(void)[moduleData queue];
if ([moduleData.instance conformsToProtocol:@protocol(RCTFrameUpdateObserver)]) {
[_frameUpdateObservers addObject:moduleData];
}