Closed Bug 279518 Opened 20 years ago Closed 18 years ago

Execution model issue?

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: bzbarsky, Assigned: jst)

References

Details

Attachments

(2 files)

I can't get the testcase to actually fail, but it's something like what I will
attach.

Per code inspection, though what timers do is post an event when the timer fires
to the current event queue on the thread that set the timer.  It seems that for
JS timeouts it would make more sense to post the timer event to the event queue
that _was_ the current event queue when the timer was set.

There are issues if that event queue has been popped, of course....
Attached file another example of this bug (deleted) —
This is an even simpler testcase. Sometimes it gives 2 alert boxes on top of
eachother. Sometimes it shows them one after the other (as it should). (WinXP,
FF 1.0)
 isn't sjoerd_visscher testign something completely different in his testcase to
bug 279518 (execution model)?

I would *expect* bz's testcase to return 1, but sjoerd's to show aaa, bbb.
Actual is 1 for bz, bbb aaa for sjoerd.

An alert blocking setTimeouts would be a limitation from my POV.

In any case, any change is likely to break apps, in Mozilla chrome, extensions
and webapps (if the latter assumed the 4x model, they are likely to be fixed by
now).
Keywords: 4xp
bz says he also sometimes (but rarely) got 2 with his testcase in mozilla.
Actually, I usually get 2 and rarely get 1 (only on first pageload?).
> In any case, any change is likely to break apps, in Mozilla chrome, extensions
> and webapps (if the latter assumed the 4x model, they are likely to be fixed by
> now).

Nonsense -- at least for a fix to the non-deterministic 1 vs. 2 result reported
here.  4.x was deterministic (single-threaded).  IE probably is too (anyone who
can test it, please report results here).

This bug needs a fix, although I didn't volunteer to fix it!  Ducking so jst can
catch ;-).

/be

Assignee: brendan → jst
1st test case: msie alerts, then shows 2 consistently
2nd test case: msie alerts aaa, then bbb after aaa is dismissed. never does it
show two alerts at the same time.
> > likely to break apps

> Nonsense -- at least for a fix to the non-deterministic 1 vs. 2

True.

FYI, I get 1 always, even with reloads. But I may be using force-reloads (due to
custom patch), which could make the difference here.
If this were fixed, what would be the way to run a script in the background of
an alert or similar blocking functions?
Depends on: 52209
This bug as filed is no longer relevant, since the code no longer has multiple event queues to work on.  I believe there is another bug covering the situation since threadmanager landed.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: