After creating a new thread in a WebKit plugin using [NSThread detachNewThreadSelector: toTarget: withObject:] any existing or new JavaScript timers created using setTimeout() fail to fire in the browser. In a web plugin a thread is created in a Cocoa method that is exposed as a JavaScript function using the JavaScript bridge feature. This Cocoa method is called by a separate JavaScript function injected into the active DOM by the web plugin. Disabling the thread creation method in the plugin or disabling the plugin with thread support and relaunching the browser enables JavaScript timers once more. Example Plugin w/Threading that breaks JavaScript timers available upon request. JavaScript timer tests: http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/
Created attachment 20404 [details] WebKit Plugin w/threading enabled and source code. Attached plugin will disable JavaScript timers when loaded. Source code shows how the thread is made and what it does within the plugin.
I do not get Xippee.plugin in the list of installed plug-ins after putting it into /Library/Internet Plug-Ins and restarting Safari. Of course, timer tests do not fail in this situation. Would it be possible for you to make a complete buildable test plug-in for debugging?
Hmm, I got a crash with Xippee code in backtrace soon after removing the plug-in from /Library/Internet Plug-Ins, so I guess that It was loaded, after all. Anyway, I don't see timer failures. Is there anything else that needs to be done to reproduce the problem?
Plugins are no longer supported in WebKit.