WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
18361
Creating thread in web plugin breaks JavaScript timer functionality
https://bugs.webkit.org/show_bug.cgi?id=18361
Summary
Creating thread in web plugin breaks JavaScript timer functionality
Tim Mityok
Reported
2008-04-08 05:27:19 PDT
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/
Attachments
WebKit Plugin w/threading enabled and source code.
(131.17 KB, application/octet-stream)
2008-04-08 05:29 PDT
,
Tim Mityok
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Tim Mityok
Comment 1
2008-04-08 05:29:43 PDT
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.
Alexey Proskuryakov
Comment 2
2008-05-12 07:17:13 PDT
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?
Alexey Proskuryakov
Comment 3
2008-05-12 07:22:20 PDT
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?
Brent Fulgham
Comment 4
2022-07-01 10:42:23 PDT
Plugins are no longer supported in WebKit.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug