mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 02:04:55 +00:00
[ReactNative] Guard agains errors during reconciliation
Summary: @public After refactoring the MessageQueue a guard was missing on around `batchedUpdates` call. Test Plan: Introduce an error on `getInitialState` of `AdsManagerTabsModalView.ios.js`
This commit is contained in:
parent
f383bf2b83
commit
5e71d352a6
@ -76,15 +76,17 @@ class MessageQueue {
|
|||||||
* Public APIs
|
* Public APIs
|
||||||
*/
|
*/
|
||||||
processBatch(batch) {
|
processBatch(batch) {
|
||||||
ReactUpdates.batchedUpdates(() => {
|
guard(() => {
|
||||||
batch.forEach((call) => {
|
ReactUpdates.batchedUpdates(() => {
|
||||||
let method = call.method === 'callFunctionReturnFlushedQueue' ?
|
batch.forEach((call) => {
|
||||||
'__callFunction' : '__invokeCallback';
|
let method = call.method === 'callFunctionReturnFlushedQueue' ?
|
||||||
guard(() => this[method].apply(this, call.args));
|
'__callFunction' : '__invokeCallback';
|
||||||
|
guard(() => this[method].apply(this, call.args));
|
||||||
|
});
|
||||||
|
BridgeProfiling.profile('ReactUpdates.batchedUpdates()');
|
||||||
});
|
});
|
||||||
BridgeProfiling.profile('ReactUpdates.batchedUpdates()');
|
BridgeProfiling.profileEnd();
|
||||||
});
|
});
|
||||||
BridgeProfiling.profileEnd();
|
|
||||||
return this.flushedQueue();
|
return this.flushedQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user