TM iOS: Run RCTPlatform methods on the main queue
Summary: This module expects to compute main queue stuffs inside getConstants(), mark it so. This address crashes when running tests: ``` Main Thread Checker: UI API called on a background thread: -[UIApplication keyWindow] PID: 88318, TID: 22602153, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 RNTester 0x0000000100beece8 RCTKeyWindow + 72 5 RNTester 0x0000000100beeee4 RCTForceTouchAvailable + 148 6 RNTester 0x0000000100c0b54d -[RCTPlatform getConstants] + 109 ``` Sample CI failure: https://circleci.com/gh/facebook/react-native/101079 Reviewed By: PeteTheHeat Differential Revision: D16198720 fbshipit-source-id: 272eaccf5027d0bf5b2838ed9623ae079fac148e
This commit is contained in:
Родитель
f83f611f56
Коммит
725e034128
|
@ -44,6 +44,11 @@ RCT_EXPORT_MODULE(PlatformConstants)
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (dispatch_queue_t)methodQueue
|
||||
{
|
||||
return dispatch_get_main_queue();
|
||||
}
|
||||
|
||||
// TODO: Use the generated struct return type.
|
||||
- (NSDictionary<NSString *, id> *)constantsToExport
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче