mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
468d1a2d2e
Summary: Renders frames in RedBox in a greyed-out style when their `collapse` field is set to `true`. This avoids outright hiding information in the stack trace while still drawing attention to frames that are likely to be more meaningful. Changelog: [General] [Changed] - Render collapsed JavaScript frames in RedBox Reviewed By: rickhanlonii Differential Revision: D18039438 fbshipit-source-id: 527588f11c0bff495842be7036cd1293bab65eb9
27 lines
1023 B
Objective-C
27 lines
1023 B
Objective-C
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
@interface RCTJSStackFrame : NSObject
|
|
|
|
@property (nonatomic, copy, readonly) NSString *methodName;
|
|
@property (nonatomic, copy, readonly) NSString *file;
|
|
@property (nonatomic, readonly) NSInteger lineNumber;
|
|
@property (nonatomic, readonly) NSInteger column;
|
|
@property (nonatomic, readonly) NSInteger collapse;
|
|
|
|
- (instancetype)initWithMethodName:(NSString *)methodName file:(NSString *)file lineNumber:(NSInteger)lineNumber column:(NSInteger)column collapse:(NSInteger)collapse;
|
|
- (NSDictionary *)toDictionary;
|
|
|
|
+ (instancetype)stackFrameWithLine:(NSString *)line;
|
|
+ (instancetype)stackFrameWithDictionary:(NSDictionary *)dict;
|
|
+ (NSArray<RCTJSStackFrame *> *)stackFramesWithLines:(NSString *)lines;
|
|
+ (NSArray<RCTJSStackFrame *> *)stackFramesWithDictionaries:(NSArray<NSDictionary *> *)dicts;
|
|
|
|
@end
|