]> source.dussan.org Git - jquery.git/commitdiff
Deferred: fix memory leak of promise callbacks
authorJason Bedard <jason+github@jbedard.ca>
Tue, 20 Jun 2017 05:23:24 +0000 (22:23 -0700)
committerRichard Gibson <richard.gibson@gmail.com>
Tue, 20 Jun 2017 05:23:24 +0000 (01:23 -0400)
Fixes gh-3606
Closes gh-3657

src/deferred.js

index 7e2ced25bed8996631acd2154413963f3df0c77a..a627f5ed62323cd92a9d43daa547ed336ccec700 100644 (file)
@@ -301,8 +301,15 @@ jQuery.extend( {
                                        // fulfilled_callbacks.disable
                                        tuples[ 3 - i ][ 2 ].disable,
 
+                                       // rejected_handlers.disable
+                                       // fulfilled_handlers.disable
+                                       tuples[ 3 - i ][ 3 ].disable,
+
                                        // progress_callbacks.lock
-                                       tuples[ 0 ][ 2 ].lock
+                                       tuples[ 0 ][ 2 ].lock,
+
+                                       // progress_handlers.lock
+                                       tuples[ 0 ][ 3 ].lock
                                );
                        }