Re: Out of order JS file execution in WebKit
Tristan Seligmann <[email protected]> Wed, 14 Apr 2010 19:32:29 +0200
| Newsgroups | gmane.comp.python.quotient.dev |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Apr 12, 2010 at 8:37 PM, <[email protected]> wrote: > There's no need to extend it. =A0This is exactly how it's supposed to > work. I believe there is a bug in the import mechanism that arises when dynamically instantiating widgets. It's been some time since I investigated the issue, and I've never found the time to file a proper bug report or fix the problem (we just worked around it by adding additional imports in places), but I think the details go something like this. If you are dynamically instantiating multiple widgets at once, the server notices that the client is missing certain modules required directly or transitively by the widget you are instantiating, and passes this information along with the serialised widget. However, the modules are then immediately added to the list of "modules already imported"; thus, if instantiating a second widget requires these modules, the server will assume they are already loaded on the client. If the second widget loads up before the imports triggered by the first widget have completed, you'll run into trouble. I'm not sure if this is the same problem that Werner is experiencing; it's not clear to me whether the widgets in question are being instantiated statically (at LivePage render time), or dynamically (by passing them to the client with callRemote). Note that this bug should be able to manifest in any browser, not just WebKit; however, since the problem is essentially a race condition, changing browsers / internet connections / etc. may cause the race to go one way or another. -- = mithrandi, i Ainil en-Balandor, a faer Ambar