Status

()

Core
DOM
--
enhancement
RESOLVED WONTFIX
11 years ago
10 years ago

People

(Reporter: Eyal Rozenberg, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
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

11 years ago
The DOM is not threadsafe by design. You shouldn't be using threads from DOM code period.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → WONTFIX
(Reporter)

Comment 2

11 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

11 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

11 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/) .
then you just happened to be lucky... that's not designed to work and often won't work.

Updated

10 years ago
Component: XP Miscellany → General
QA Contact: brendan → general

Updated

10 years ago
Component: General → DOM
QA Contact: general → general
You need to log in before you can comment on or make changes to this bug.