Filter out Hermes internal bytecode frames from error stack traces

Summary:
Changelog: [Fixed][General] Filter out Hermes internal bytecode frames (Promise implementation) from error stack traces

Currently, React Native strips native frames from call stacks reported via ExceptionsManager / LogBox. This diff does the same for *internal bytecode* frames in Hermes, which are functionally similar to native frames: they are implementation details of the engine for which source code isn't readily available.

In particular this change will avoid confusing symbolication tools that may otherwise try to treat `InternalBytecode.js` frames as belonging to the main React Native bundle (and produce garbage output).

Reviewed By: GijsWeterings

Differential Revision: D42367135

fbshipit-source-id: b7904f10c7ff6956e7b736b575dde1ce45028200
This commit is contained in:
Moti Zilberman
2023-01-05 11:05:39 -08:00
committed by Facebook GitHub Bot
parent f723ab002e
commit 4c911a2dec
3 changed files with 65 additions and 7 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ function convertHermesStack(stack: HermesParsedStack): Array<StackFrame> {
continue;
}
const {location, functionName} = entry;
if (location.type === 'NATIVE') {
if (location.type === 'NATIVE' || location.type === 'INTERNAL_BYTECODE') {
continue;
}
frames.push({