Opened 14 years ago

Closed 12 years ago

#429 closed defect (fixed)

IE9 Beta:Toolbar ( Main Menu) in TB Web doesn't display

Reported by: yangte Owned by: Ted Yang
Priority: P2 Milestone: 2.3
Component: MapGuide Version: 2.0
Severity: Major Keywords:
Cc: Browser: Other
External ID: 1377082 Operating System: Windows
state: New

Description

Now the IE9 beta, Safari, Firefox and Chrome all support the script onload event (see the funsion.js line423 and 503), but the IE9 beta will trigger the event synchronously, so the "aLoadingScripts" which stores the scripts to be loaded will be changed before the "for loop sentence" is finished, that means once the onload event is triggered the execution will go to the event handler code, and the codes manipulated the same array, which caused half of the scripts not be loaded.

Attachments (1)

ticket429.patch (2.7 KB ) - added by yangte 14 years ago.

Download all attachments as: .zip

Change History (5)

by yangte, 14 years ago

Attachment: ticket429.patch added

comment:1 by yangte, 14 years ago

the attachment is my solution: create a temp collection to store the loading script.

comment:2 by pagameba, 14 years ago

That is interesting (the 'synchronous' behaviour) and actually seems like a bug (in IE9 beta) to me - its actually more multi-threaded than synchronous as the execution stack moves to an event handler before the current scope has completed. I don't think any other javascript engine interrupts the current execution stack to process events like this (i.e. multi-threaded javascript execution). It is actually one of the features of javascript engines that actually makes it possible to handle asynchronous execution without resorting to traditional multi-threaded techniques. In any case, the patch looks like a great way to handle this problem. I just worry about other code not being thread safe now ;)

in reply to:  2 comment:3 by yangte, 14 years ago

Replying to pagameba:

That is interesting (the 'synchronous' behaviour) and actually seems like a bug (in IE9 beta) to me ....

I totally agree with you that it is a defect in IE9 beta, because it makes the code execution unpredictable. I have tested this code on latest released versions of Firefox, Safari and Chrome; none of them interrupts the current execution stack to process events.

comment:4 by jng, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.