Closed
Bug 389592
Opened 17 years ago
Closed 17 years ago
thread-safe alert()
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: eyalroz1, Unassigned)
Details
I wish I could use alert() from a thread other than the main UI one. I don't care if it would make all threads wait for the 'ok' click, I don't care whether it's done by proxying or any other way - I just want to have alert() do something reasonable (other than triggering a hang, which is what currently happens).
Comment 1•17 years ago
|
||
The DOM is not threadsafe by design. You shouldn't be using threads from DOM code period.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Reporter | ||
Comment 2•17 years ago
|
||
Ah, but I'm not using threads from 'DOM code' (at least, not according to what I think is DOM code). The only exception to this is the fact that I want my threads to be able to trigger an alert().
Comment 3•17 years ago
|
||
Any JavaScript that runs in the context of a page (XUL/HTML/whatever) is DOM script: that is, the global object is the DOM window, and therefore it is not safe to run any threaded code in that context.
Reporter | ||
Comment 4•17 years ago
|
||
But it is (mostly) safe, at least from my experience, provided your thread doesn't do anything related to the UI. I used a separate thread to search mail folders for duplicate messages (http://removedupes.mozdev.org/) .
Comment 5•17 years ago
|
||
then you just happened to be lucky... that's not designed to work and often won't work.
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•