javascriptcore

iOS Crash related to javascript core, web thread

泪湿孤枕 提交于 2019-12-03 20:57:51
getting lots of crashes in ios11 as below: webkit framework is included in project. any idea what could be reason for this crash ? Crashed: WebThread 0 JavaScriptCore 0x18bdbeebc bmalloc::Heap::allocateSmallChunk(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long) + 680 1 JavaScriptCore 0x18bdbec70 bmalloc::Heap::allocateSmallChunk(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long) + 92 2 JavaScriptCore 0x18bdbef58 bmalloc::Heap::allocateSmallPage(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long, std::__1::array<bmalloc::List<bmalloc::SmallPage>, 112ul>&) + 152 3

Should I avoid creating JSContexts in global queues?

倖福魔咒の 提交于 2019-12-03 16:53:42
I've just had a crash log from a customer's device, and it's crashing here: dispatch_async(dispatch_get_global_queue(0, 0), ^{ JSContext *javaScriptContext = [[JSContext alloc] init]; Here's the crash log: Thread 11 Crashed: 0 JavaScriptCore 0x31009cd6 WTFCrash + 54 1 JavaScriptCore 0x30e0edf6 WTF::OSAllocator::reserveAndCommit(unsigned long, WTF::OSAllocator::Usage, bool, bool, bool) + 166 2 JavaScriptCore 0x30e0ed2a WTF::OSAllocator::reserveUncommitted(unsigned long, WTF::OSAllocator::Usage, bool, bool, bool) + 14 3 JavaScriptCore 0x30e14736 JSC::JSStack::JSStack(JSC::VM&, unsigned long) +

ObjectiveC and JavaScriptCore: Will using this method of calling CallBacks cause memory issues?

假装没事ソ 提交于 2019-12-03 10:04:01
问题 DISCLAIMER: This is a long post, but could prove very valuable for those grappling with using the new ObjectiveC JavascriptCore framework and doing asynchronous coding between ObjC and JS. Hi there, I'm super new to Objective C and am integrating a javascript communication library into my iOS app. Anyway, I've been trying my hand at using the new ObjectiveC JavaScriptCore Framework introduced in iOS7. It's pretty awesome for the most part, though quite poorly documented so far. It's really

UIWebView JavaScript losing reference to iOS JSContext namespace (object)

青春壹個敷衍的年華 提交于 2019-12-03 04:22:40
问题 I've been working on a proof of concept app that leverages two-way communication between Objective C (iOS 7) and JavaScript using the WebKit JavaScriptCore framework. I was finally able to get it working as expected, but have run into a situation where the UIWebView loses its reference to the iOS object that I've created via JSContext. The app is a bit complex, here are the basics: I'm running a web server on the iOS device (CocoaHTTPServer) The UIWebView initially loads a remote URL, and is

ObjectiveC and JavaScriptCore: Will using this method of calling CallBacks cause memory issues?

微笑、不失礼 提交于 2019-12-03 00:33:15
DISCLAIMER: This is a long post, but could prove very valuable for those grappling with using the new ObjectiveC JavascriptCore framework and doing asynchronous coding between ObjC and JS. Hi there, I'm super new to Objective C and am integrating a javascript communication library into my iOS app. Anyway, I've been trying my hand at using the new ObjectiveC JavaScriptCore Framework introduced in iOS7. It's pretty awesome for the most part, though quite poorly documented so far. It's really strange mixing language conventions, but also kind of liberating in some ways. I should add that I am of

Why not sending JavaScript files in browser-specific bytecode? [closed]

你。 提交于 2019-12-02 20:08:56
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . There is no universal bytecode for JavaScript, but most JavaScript engines have their own bytecode. Since JavaScript files travel as source code string, they have to parse/compile source code string into bytecode at before execution. However, as we can specify a user agent

UIWebView JavaScript losing reference to iOS JSContext namespace (object)

允我心安 提交于 2019-12-02 17:38:25
I've been working on a proof of concept app that leverages two-way communication between Objective C (iOS 7) and JavaScript using the WebKit JavaScriptCore framework. I was finally able to get it working as expected, but have run into a situation where the UIWebView loses its reference to the iOS object that I've created via JSContext. The app is a bit complex, here are the basics: I'm running a web server on the iOS device (CocoaHTTPServer) The UIWebView initially loads a remote URL, and is later redirected back to localhost as part of the app flow (think OAuth) The HTML page that the app

Why not sending JavaScript files in browser-specific bytecode? [closed]

纵饮孤独 提交于 2019-12-02 08:31:07
There is no universal bytecode for JavaScript, but most JavaScript engines have their own bytecode. Since JavaScript files travel as source code string, they have to parse/compile source code string into bytecode at before execution. However, as we can specify a user agent type (e.g. browser type and version) in HTTP request, can't we make the server keep bytecode for each browser and respond accordingly to save some time at client? What's preventing us from taking this approach? I don't think browsers will have no problem even if some JavaScript files are given in bytecode and others in

WebThread JavaScriptCore crash - what this crash report means

家住魔仙堡 提交于 2019-12-01 05:37:35
I need help in understanding this crash log from a test user. I did not write any JavaScriptCore related code in my app. I still don't know how to reproduce this crash. Any insights about this problem would be helpful to me in finding this problem. Thanks, P.S My app is using Admob mediation. I don't know if it has some relation about this. Incident Identifier: 7B6EFFFF-4D55-48AE-8FE8-A55590405F0A CrashReporter Key: ef1ad783966254a93308221f30f17134c95879f7 Hardware Model: iPad5,3 Process: ???? [2325] Path: /private/var/mobile/Containers/Bundle/Application/16AE72E1-A8C8-45D9-955F-A6F96FCCE800/?

WebThread JavaScriptCore crash - what this crash report means

限于喜欢 提交于 2019-12-01 03:48:47
问题 I need help in understanding this crash log from a test user. I did not write any JavaScriptCore related code in my app. I still don't know how to reproduce this crash. Any insights about this problem would be helpful to me in finding this problem. Thanks, P.S My app is using Admob mediation. I don't know if it has some relation about this. Incident Identifier: 7B6EFFFF-4D55-48AE-8FE8-A55590405F0A CrashReporter Key: ef1ad783966254a93308221f30f17134c95879f7 Hardware Model: iPad5,3 Process: ???