[webkit-dev] JavaScriptCore: Garbage Collector Issue

2015-05-27 Thread Max Hentschel
Hello,

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


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] JavaScriptCore: Garbage Collector Issue

2015-05-27 Thread Geoffrey Garen
Hi Max.

The best way to get help with a potential bug in JavaScriptCore is to post 
example code that reproduces the bug to bugs.webkit.org.

 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.

Can you post a backtrace of all threads in the frozen state? You can get a 
backtrace from the debugger, or the sample command line tool, or the 
Instruments Time Profiler.

 I guess that the JavaScriptCore context (or virtual machine) are not 
 deinitialized after the method call was successful.

I don’t know what you mean by this. I don’t think this is a thing.

 I even tried a manual deinitialize but it still freezes.

Ditto.

Regards,
Geoff
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev