resourceloader: Remove redundant var-freeing in addScript()
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 9 Mar 2019 05:06:36 +0000 (05:06 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Sat, 9 Mar 2019 05:11:35 +0000 (05:11 +0000)
This was copied from jQuery 1.x, where it existed to reduce
memory usage in IE6-8. This was because it's JS engine was not
able to break the circular closure reference (the function
invocation has a reference to the script element, the script
element has an event listener with closure access to the script
element). This bug is no longer relevant.

Change-Id: I6fd66c5fbf3afb3c9e09bba6322dc3fac2fad4a6

resources/src/startup/mediawiki.js

index a0c7c61..5c574a2 100644 (file)
                                        if ( script.parentNode ) {
                                                script.parentNode.removeChild( script );
                                        }
-                                       script = null;
                                        if ( callback ) {
                                                callback();
                                                callback = null;