android&iOS:create context set this to undefined

This commit is contained in:
pengfei.zhou
2020-01-08 20:18:19 +08:00
committed by osborn
parent cdaebe46cd
commit 0087c5bda4
10 changed files with 67 additions and 5 deletions

View File

@@ -150,7 +150,7 @@ - (JSValue *)invokeDoricMethod:(NSString *)method argumentsArray:(NSArray *)args
}
- (NSString *)packageContextScript:(NSString *)contextId content:(NSString *)content {
NSString *ret = [NSString stringWithFormat:TEMPLATE_CONTEXT_CREATE, content, contextId, contextId, contextId];
NSString *ret = [NSString stringWithFormat:TEMPLATE_CONTEXT_CREATE, content, contextId, contextId];
return ret;
}

View File

@@ -38,7 +38,7 @@
NSString *const TEMPLATE_CONTEXT_CREATE = @"Reflect.apply("
"function(doric,context,Entry,require,exports){" "\n"
"%@" "\n"
"},doric.jsObtainContext(\"%@\"),["
"},undefined,["
"undefined,"
"doric.jsObtainContext(\"%@\"),"
"doric.jsObtainEntry(\"%@\"),"