Index: samples/o3d-webgl/file_request.js |
=================================================================== |
--- samples/o3d-webgl/file_request.js (revision 45126) |
+++ samples/o3d-webgl/file_request.js (working copy) |
@@ -187,6 +187,10 @@ |
o3d.FileRequest.prototype.open = |
function(method, uri, async) { |
this.uri = uri; |
+ // TODO(petersont): I think there is a race condition here -- calling |
+ // code expects that it can still set up the onreadystatechange callback |
+ // between open() and send(), but if open() actually initiates the XHR |
+ // then the caller may miss the crucial completion callback! |
if (this.isImageUrl_(uri)) { |
this.image_ = new Image(); |
var that = this; |