Skip to content

Commit 6ecf550

Browse files
committed
Merge branch 'feature/17406-jscontext-name' into develop
2 parents e91e386 + a040ea0 commit 6ecf550

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/framework/COScript.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
@property (strong, nonatomic) NSDictionary* coreModuleMap;
3636
@property (strong, nonatomic) NSMutableDictionary* moduleCache;
3737

38-
- (instancetype)initWithCoreModules:(NSDictionary*)coreModules;
38+
- (instancetype)initWithCoreModules:(NSDictionary*)coreModules andName:(NSString*)name;
3939
- (void)cleanup;
4040
- (void)garbageCollect;
4141
- (id)executeString:(NSString*) str;

src/framework/COScript.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ + (void)setShouldLoadJSTPlugins:(BOOL)b {
7474

7575

7676
- (id)init {
77-
return [self initWithCoreModules:@{}];
77+
return [self initWithCoreModules:@{} andName:nil];
7878
}
7979

80-
- (instancetype)initWithCoreModules:(NSDictionary*)coreModules {
80+
- (instancetype)initWithCoreModules:(NSDictionary*)coreModules andName:(NSString*)name {
8181
self = [super init];
8282
if ((self != nil)) {
83-
_mochaRuntime = [[Mocha alloc] initWithName:@"Untitled"];
83+
_mochaRuntime = [[Mocha alloc] initWithName:name ? name : @"Untitled"];
8484

8585
self.coreModuleMap = coreModules;
8686
if (!coreModuleScriptCache) {

0 commit comments

Comments
 (0)