Side navigation
Ticket #3485: isfunction_memory_leak.diff
File isfunction_memory_leak.diff, 0.6 KB (added by choan, October 15, 2008 04:49PM UTC)
Index: src/core.js
===================================================================
--- src/core.js (revision 5872)
+++ src/core.js (working copy)
@@ -614,8 +614,10 @@
// See test/unit/core.js for details concerning this function.
// Since 1.3 DOM methods and function like alert
// aren't supported. They return false on IE (#2968).
+ // Memory leaks appear in IE6 when applyin instance of to
+ // window, document or any other COM object
isFunction: function( fn ) {
- return fn instanceof Function;
+ return !!fn && !!fn.hasOwnProperty && fn instanceof Function;
},
// check if an element is in a (or is an) XML document
Download in other formats:
Original Format
File isfunction_memory_leak.diff, 0.6 KB (added by choan, October 15, 2008 04:49PM UTC)
Index: src/core.js
===================================================================
--- src/core.js (revision 5872)
+++ src/core.js (working copy)
@@ -614,8 +614,10 @@
// See test/unit/core.js for details concerning this function.
// Since 1.3 DOM methods and function like alert
// aren't supported. They return false on IE (#2968).
+ // Memory leaks appear in IE6 when applyin instance of to
+ // window, document or any other COM object
isFunction: function( fn ) {
- return fn instanceof Function;
+ return !!fn && !!fn.hasOwnProperty && fn instanceof Function;
},
// check if an element is in a (or is an) XML document