Opened 9 years ago

Closed 9 years ago

#160 closed defect (fixed)

reentrancy issues with BrowserIO.js

Reported by: hp@… Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.1
Keywords: Cc:
Blocked by: Blocking:

Description

In watchInFlight(), the code does:

doLoad(tif.req, tif.http, tif.url, tif.query, tif.useCache);
this.inFlight.splice(x, 1);

But doLoad() is calling out to application code, so this.inFlight can be modified during the callout. Or, I believe what's happening in my case is that I call another xmlhttprequest, which goes back over this.inFlight and calls doLoad() a second time for the same request.

There are various possible fixes, the smallest is maybe to swap those two lines, another is to have an "already did load" flag that doLoad checks, ...
anyway the idea would be to guarantee that only one load/error function invocation happens per request.

Change History (1)

comment:1 Changed 9 years ago by alex

  • Resolution set to fixed
  • Status changed from new to closed

(In [1822]) implementing reentrancy fix suggested by Havoc Pennington. fixes #160

Note: See TracTickets for help on using tickets.