[webkit-dev] JavaScriptCore: Garbage Collector Issue

Max Hentschel maxh at fs.cs.hm.edu
Wed May 27 05:47:13 PDT 2015


I watched the WWDC 2013 session on integrating JavaScript into native apps and so I implemented a JavaScript library for a Swift iOS app connecting via JavaScriptCore. Although I don’t really know if this mail list is the correct place to ask, I thought I’d give it a shot.
I really liked how easy it was to get Swift to work with JavaScript and vice versa. But I stumbled upon a problem when I was testing the performance of my app. I wrote a XCTest in Xcode which performs multiple calls of the JavaScript library (with loops) but it always stops or freezes after the 292nd call.
I guess that the JavaScriptCore context (or virtual machine) are not deinitialized after the method call was successful. I even tried a manual deinitialize but it still freezes. I looked up the allocations in Instruments and it shows multiple VM: JS garbage collector allocations which are still active in the app.
I wrote a question on StackOverflow with some code examples and the Instruments log:
http://stackoverflow.com/questions/30443993/javascriptcore-on-ios-vm-garbage-collector-not-automatically-emtpying <http://stackoverflow.com/questions/30443993/javascriptcore-on-ios-vm-garbage-collector-not-automatically-emtpying>
but I haven’t received a single answer yet. I guess JavaScriptCore on iOS is still something that is not being used very much.

I would be very happy if someone could take a look into my problem and share thoughts on it. This is part of my bachelor thesis so it would really help me a lot.

Thank you in advance and best regards,
Max Hentschel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20150527/b43e2fd2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20150527/b43e2fd2/attachment.sig>

More information about the webkit-dev mailing list