Directions:
load http://www.lisbakken.com/gears/repro_gears/GreaseMonkey/badCapture/captureWorks.user.js in greasemonkey, then come back to this page. capture works.
load http://www.lisbakken.com/gears/repro_gears/GreaseMonkey/badCapture/captureDoesntWork.user.js in greasemonkey, then come back to this page. mac firefox crashes.
The content here doesn't matter. We're just going to try to capture it with an event handler through GearsMonkeys then try to capture it without any event triggering.
No event triggered capture = crash firefox on mac (maybe on PC too? IE?)
The difference between the working version and crashing version is on line 36. Working =
function triggerCapture() {
window.addEventListener("load",
function(){
store.capture(location.href,
function(url, success, captureId){
console.log("url: " + url + " success: " + success + " captureId: " +
captureId);
}
);
},
true);
}
Crashing =
function triggerCapture() {
store.capture(location.href,
function(url, success, captureId){
console.log("url: " + url + " success: " + success + " captureId: " +
captureId);
}
);
}