r89987 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89986‎ | r89987 | r89988 >
Date:18:15, 13 June 2011
Author:neilk
Status:ok
Tags:
Comment:
prevent subscriptions and readiness events from hanging around forever
Modified paths:
  • /trunk/extensions/UploadWizard/resources/jquery/jquery.pubsub.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/jquery/jquery.pubsub.js
@@ -99,4 +99,19 @@
100100 }
101101 return success;
102102 };
 103+
 104+ /**
 105+ * Prevent ready objects from hanging around forever
 106+ */
 107+ $.purgeReadyEvents = function() {
 108+ ready = {};
 109+ };
 110+
 111+ /**
 112+ * Remove all subscriptions from everything
 113+ */
 114+ $.purgeSubscriptions = function() {
 115+ subs = {};
 116+ };
 117+
103118 } )( jQuery );
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -775,6 +775,8 @@
776776 * Depending on whether we split uploading / detailing, it may actually always be as simple as loading a URL
777777 */
778778 reset: function() {
 779+ $.purgeReadyEvents();
 780+ $.purgeSubscriptions();
779781 this.removeMatchingUploads( function() { return true; } );
780782 },
781783

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89913readiness events, that can occur only once, and can be subscribed to even if ...neilk05:13, 12 June 2011

Status & tagging log