mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-26 13:25:51 +08:00
YellowBox: Allow Retrying Symbolication
Summary: When symbolication fails, allow retrying without having to reload the current JS VM. Reviewed By: ejanzer Differential Revision: D9760666 fbshipit-source-id: 63837c81fe77a9b0b897a858e3d64bc7dcf2c3bd
This commit is contained in:
committed by
Facebook Github Bot
parent
5e6e5e92ca
commit
d6b9ec1c1f
@@ -21,6 +21,10 @@ export type Stack = Array<StackFrame>;
|
||||
const cache: Map<CacheKey, Promise<Stack>> = new Map();
|
||||
|
||||
const YellowBoxSymbolication = {
|
||||
delete(stack: Stack): void {
|
||||
cache.delete(getCacheKey(stack));
|
||||
},
|
||||
|
||||
symbolicate(stack: Stack): Promise<Stack> {
|
||||
const key = getCacheKey(stack);
|
||||
|
||||
|
||||
@@ -63,6 +63,11 @@ class YellowBoxWarning {
|
||||
: this.stack;
|
||||
}
|
||||
|
||||
retrySymbolicate(callback: () => void): SymbolicationRequest {
|
||||
YellowBoxSymbolication.delete(this.stack);
|
||||
return this.symbolicate(callback);
|
||||
}
|
||||
|
||||
symbolicate(callback: () => void): SymbolicationRequest {
|
||||
let aborted = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user