Disable crash reporter plugin for iOS and update callstack from array to string
Summary: This diff does the following - Comments out the code in iOS which sends the message to the desktop side - Also comments out the part where signal handler is initialised, as we no longer need it. I will remove the iOS implementation completely in next few diffs - Updated the JS side to expect call stack as a string instead of an array - Updated the android side to send callstack as a string I have commented out the code for crash reporter plugin of iOS as for iOS I will be adding a watchman to a directory where crash logs are dumped. The diff related to this is in the stack Reviewed By: passy Differential Revision: D13424824 fbshipit-source-id: b1105da912292bf73cff948206c031de9b059abd
This commit is contained in:
committed by
Facebook Github Bot
parent
73e921bafc
commit
e3fb1e1d84
@@ -21,7 +21,7 @@ import type {Notification} from '../../plugin';
|
||||
|
||||
type Crash = {|
|
||||
notificationID: number,
|
||||
callStack: [string],
|
||||
callStack: string,
|
||||
reason: string,
|
||||
name: string,
|
||||
|};
|
||||
@@ -112,18 +112,8 @@ export default class CrashReporterPlugin extends FlipperDevicePlugin {
|
||||
});
|
||||
};
|
||||
|
||||
convertCallstackToString(crash: Crash): string {
|
||||
return crash.callStack.reduce((acc, val) => acc.concat('\n', val));
|
||||
}
|
||||
|
||||
openInLogs = (crash: Crash) => {
|
||||
this.props.selectPlugin(
|
||||
'DeviceLogs',
|
||||
crash.callStack
|
||||
.slice(0, 5)
|
||||
.join('\n\tat ')
|
||||
.trim(),
|
||||
);
|
||||
openInLogs = (callstack: string) => {
|
||||
this.props.selectPlugin('DeviceLogs', callstack);
|
||||
};
|
||||
|
||||
render() {
|
||||
@@ -134,7 +124,7 @@ export default class CrashReporterPlugin extends FlipperDevicePlugin {
|
||||
];
|
||||
|
||||
if (crash) {
|
||||
const callStackString = this.convertCallstackToString(crash);
|
||||
const callStackString = crash.callStack;
|
||||
return (
|
||||
<RootColumn>
|
||||
<CrashRow>
|
||||
@@ -163,7 +153,7 @@ export default class CrashReporterPlugin extends FlipperDevicePlugin {
|
||||
</CrashRow>
|
||||
{this.device.os == 'Android' && (
|
||||
<CrashRow>
|
||||
<Button onClick={() => this.openInLogs(crash)}>
|
||||
<Button onClick={() => this.openInLogs(crash.callStack)}>
|
||||
Open in Logs
|
||||
</Button>
|
||||
</CrashRow>
|
||||
|
||||
Reference in New Issue
Block a user