Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#1704 closed defect (fixed)

FF3: Follow up with Mozilla about trac 1640

Reported by: James Burke Owned by: James Burke
Priority: high Milestone: 1.1
Component: Loader Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

We have a workaround for the Firefox hang in trac #1640, but we should investigate more and engage Mozilla to find the core issue.

Change History (12)

comment:1 Changed 13 years ago by ttudor@…

A possible (and partial) workaround for #1640 is to :

1. Remove all src on images BEFORE bootstraping dojo.js
2. load dojo.js
3. Put original src back on images.

Details :


var gImgDeposit = [];

function evictImages() {

	var imgs = document.getElementsByTagName("img");
	var evicted = 0;
	for (var k = 0; k < imgs.length; k++) {
		var img = imgs.item(k);
		// This is for cached images
		if (img.complete) continue;
		
		gImgDeposit[evicted++] = {
			img : img,
			src : img.getAttribute("src")
		};
		img.setAttribute("src", "");			
	}			
}
	
function resurrectImages() {
	for (var k = 0; k < gImgDeposit.length; k++) {
		var img = gImgDeposit[k].img;
		var src = gImgDeposit[k].src;
		
		delete gImgDeposit[k];	
		img.setAttribute("src", src);
	}
	delete gImgDeposit;
}		

// DO THIS BEFORE INCLUDING dojo.js

var listener = function() {
	evictImages();
	document.removeEventListener("DOMContentLoaded", listener, null);
}
document.addEventListener("DOMContentLoaded", listener, null);

// ... LOAD DOJO 

// DO THIS AFTER HAVING LOADED dojo.js

listener = function() {
	resurrectImages();
	document.removeEventListener("DOMContentLoaded", listener, null);
}
document.addEventListener("DOMContentLoaded", listener, null);

Tried it with the current dojo HEAD and it works all right. dojo will still hang if you have really large (>64k) images included from css.

Sorry if this is not the right track to post the workaround.

comment:2 Changed 13 years ago by bill

Owner: changed from alex to Adam Peller

Adam or Koranteng will handle this.

comment:3 Changed 13 years ago by Adam Peller

Filed bug with Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=358387 Will follow up with Mozilla team

comment:4 Changed 13 years ago by Adam Peller

Ok, so we have our initial answer from Mozilla. The code is completely broken and is fixed in the trunk. I verified this. What does this mean? We won't see the fix in a release until mid-2007 at best (Firefox 3.0) Can we deal with the workaround until then?

The ThreadManager? is not something they will retrofit into 2.0. Apparently, it's too complex and probably too risky.

I'm thinking this will end up as a "won't fix" on our end, with us settling on one of our workarounds until FF3.0.

comment:5 Changed 13 years ago by Adam Peller

Resolution: wontfix
Status: newclosed

looks like we wait for this one

comment:6 Changed 12 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

comment:7 Changed 12 years ago by James Burke

Milestone: 1.1
Resolution: wontfix
Status: closedreopened

comment:8 Changed 12 years ago by James Burke

Owner: changed from Adam Peller to James Burke
Status: reopenednew
Summary: Follow up with Mozilla about trac 1640Firefox 3: Follow up with Mozilla about trac 1640

This may be fixed in Firefox 3. In that case, revisit the logic for enableMozDomContentLoaded.

comment:9 Changed 12 years ago by bill

Summary: Firefox 3: Follow up with Mozilla about trac 1640FF3: Follow up with Mozilla about trac 1640

comment:10 Changed 12 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [12432]) Fixes #1704: using DOMContentLoaded now for Firefox 3, since the hang bug is now fixed (as tested in FF 3beta3).

comment:11 Changed 12 years ago by James Burke

I also added a note to the bugzilla bug mentioning that the issue seems to be fixed.

comment:12 Changed 11 years ago by dylan

I had a chat with key people at Mozilla today regarding https://bugzilla.mozilla.org/show_bug.cgi?id=444322 ... a strong patch was reviewed today. They're going to do everything possible to get this into 3.0.5... no guarantees, but that's what they want to do for us.

Note: See TracTickets for help on using tickets.