alibaba / alibaba/coobjc

在协程里面不能使用JsContext?

Open
#68 4 comments 2 reactions 1 assignee Claimed by @NianJi View on GitHub
bug
Dominant language
Objective-C
Stars
4k
Forks
519
PR merge metrics
No merged PRs in 30d

Description

### 在协程里面使用JsContext会出现exception

### Environment Details

* coobjc version:master
* iOS version:ios12
* Xcode version:10
* Other informations:

### Steps to Reproduce
```objectivec
co_launch(^{
JSContext *mJsContext = [[JSContext alloc] init];
mJsContext.exceptionHandler = ^(JSContext *context, JSValue *exception) {
NSLog(@"%@", exception);
};
[mJsContext evaluateScript:@"var a = 1"];
});
```
运行上述代码,会出现jsException

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.