Comments (5)
又有一次,在 iOS 9.2.1(13D15) 设备上。
#13 Thread SIGSEGV
SEGV_ACCERR
0 libobjc.A.dylib | objc_msgSend + 8
1 CoreFoundation | -[__NSDictionaryM objectForKey:] + 148
2 匿了 | -[KKJSBridgeModuleRegister generateInstanceFromMetaClass:] (KKJSBridgeModuleRegister.m:0)
3 匿了 | -[KKJSBridgeMessageDispatcher dispatchCallbackMessageInQueue:] (KKJSBridgeMessageDispatcher.m:0)
4 匿了 | __55-[KKJSBridgeMessageDispatcher dispatchCallbackMessage:]_block_invoke (KKJSBridgeMessageDispatcher.m:59)
5 Foundation | ___NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
6 Foundation | -[NSBlockOperation main] + 96
7 Foundation | -[__NSOperationInternal _start:] + 604
8 Foundation | ___NSOQSchedule_f + 224
9 libdispatch.dylib | __dispatch_client_callout + 16
10 libdispatch.dylib | __dispatch_queue_drain + 864
11 libdispatch.dylib | __dispatch_queue_invoke + 464
12 libdispatch.dylib | __dispatch_root_queue_drain + 728
13 libdispatch.dylib | __dispatch_worker_thread3 + 112
14 libsystem_pthread.dylib | _pthread_wqthread + 1092
from kkjsbridge.
嗯,知道问题了,感谢。最近有点忙。
from kkjsbridge.
KKJSBridge 1.2.2 已经修复了
from kkjsbridge.
非常感谢,辛苦了!
我在 fork 里修改了一次(见 wjiuxing/KKJSBridge commit b9d6b39),没有做详细的性能测试,粗略地看没啥影响。
我觉得在 KKJSBridgeMessageDispatcher
中 的 dispatchQueue
必要性不是很大,所以我把线程相关的去掉了,理由如下:
<WKScriptMessageHandler>
在主线程里回调到方法 userContentController:didReceiveScriptMessage:
并解析成 KKJSBridgeMessage
对象,在 dispatcher 里做一次线程调度,根据 KKJSBridgeMessage
找到具体的 module 与消息转发[1],然后再切换到主线程去调用 module 的方法。
为了 [1] 这件小事做了两次线程调度,有点得不偿失的感觉。
情况可能因项目而异,待我下个版本试试。
再次感谢 ❤
from kkjsbridge.
嗯,主要考虑到还有 event 要处理,所以就统一单独放在一个队列里了。
from kkjsbridge.
Related Issues (20)
- window.prompt("KKJSBridge", messageString)不触发UIDelegate回调方法 HOT 4
- url参数包含中文,利用 requestId 生成新的 url就会有问题 HOT 5
- 如何实现重定向页面的跳转 HOT 4
- 用了这个解决了ajax请求body丢失的问题后又出现xhr.upload.addeventlistener 失效的问题 HOT 1
- cookie问题请教 HOT 2
- H5离线包如果使用虚拟域名加载可以支持吗? HOT 1
- 使用测试Demo加载百度,打开百度新闻视频类加载不了
- 302 重定向后 cookie 出错
- Demoy源码
- crash:NSOperationQueue 0x282bedca0 (QOS: UNSPECIFIED) HOT 1
- ajax同步请求这里为啥直接弹alert了大佬
- 如果是使用Ajax Hook 部分 API + NSURLProtocol会不会app store审核能过吗? HOT 1
- 复用时,H5 跳转页面,点导航返回异常 HOT 1
- iframe 的请求,body 是空的
- websocket拦截不了
- -[__NSArrayM bytes]: unrecognized selector sent to instance
- Google CapTcha HOT 1
- Hook后无法正常打开网页 HOT 1
- 使用KKWebView后js交互方法执行异常
- 在 iOS14.x 版本中出现了 localstorage 不同步的问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kkjsbridge.