Skip to main content

Bug Tracker

Side navigation

Ticket #5122: jquery-callee-fix.patch
File jquery-callee-fix.patch, 0.6 KB (added by raszi, August 25, 2009 03:24PM UTC)

The problematic code surrounded with try catch block

Index: jquery-1.3.2.js
===================================================================
--- jquery-1.3.2.js	(revision 83)
+++ jquery-1.3.2.js	(working copy)
@@ -3105,9 +3105,11 @@
 // Window isn't included so as not to unbind existing unload events
 jQuery( window ).bind( 'unload', function(){ 
 	for ( var id in jQuery.cache )
-		// Skip the window
-		if ( id != 1 && jQuery.cache[ id ].handle )
-			jQuery.event.remove( jQuery.cache[ id ].handle.elem );
+		try {
+			// Skip the window
+			if ( id != 1 && jQuery.cache[ id ].handle )
+				jQuery.event.remove( jQuery.cache[ id ].handle.elem );
+		} catch(e){}
 }); 
 (function(){

Download in other formats:

Original Format