[richfaces-svn-commits] JBoss Rich Faces SVN: r6142 - trunk/framework/impl/src/main/javascript/jquery.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Feb 18 10:10:50 EST 2008
Author: pyaschenko
Date: 2008-02-18 10:10:49 -0500 (Mon, 18 Feb 2008)
New Revision: 6142
Modified:
trunk/framework/impl/src/main/javascript/jquery/patches.js
Log:
RF-2224
Modified: trunk/framework/impl/src/main/javascript/jquery/patches.js
===================================================================
--- trunk/framework/impl/src/main/javascript/jquery/patches.js 2008-02-18 15:08:58 UTC (rev 6141)
+++ trunk/framework/impl/src/main/javascript/jquery/patches.js 2008-02-18 15:10:49 UTC (rev 6142)
@@ -1,4 +1,10 @@
-if (jQuery(jQuery) != jQuery) {
+if (!window.RichFaces) {
+ window.RichFaces = {};
+}
+
+// calling jQuery(jQuery) makes memory leaks
+//if (jQuery(jQuery) != jQuery) {
+if (!window.RichFaces.jQueryWrapper) {
var oldJQuery = jQuery;
jQuery = function() {
if (arguments[0] == arguments.callee) {
@@ -10,7 +16,10 @@
if (window.RichFaces && window.RichFaces.Memory) {
window.RichFaces.Memory.addCleaner("jquery", function(node) {
- oldJQuery.event.remove(node);
+ if (node && node[oldJQuery.expando]) {
+ oldJQuery.event.remove(node);
+ }
});
}
-};
+ window.RichFaces.jQueryWrapper = true;
+};
\ No newline at end of file
More information about the richfaces-svn-commits
mailing list