resourceloader: Remove redundant check in mw.loader.store for Opera 12
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 24 Aug 2018 03:08:06 +0000 (04:08 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Sun, 26 Aug 2018 04:25:16 +0000 (05:25 +0100)
Opera 12 is no longer supported for Grade A. This regex was currently
running on every module script executed on every page in between
each module's execution.

execute() for module A -> handlePending -> mw.loader.store.set()
-> Opera 12 check -> schedule update -> yield to module B.

The serialisation logic in store.set() should probably more
generally deferred and taken out of this path, but until then,
every bit helps.

Change-Id: I8d4628b6d663fe25040c6ef0b4983a4b7eea94c6

resources/src/startup/mediawiki.js

index 1ec2470..a80f453 100644 (file)
                                                                JSON.stringify( descriptor.messages ),
                                                                JSON.stringify( descriptor.templates )
                                                        ];
-                                                       // Attempted workaround for a possible Opera bug (bug T59567).
-                                                       // This regex should never match under sane conditions.
-                                                       if ( /^\s*\(/.test( args[ 1 ] ) ) {
-                                                               args[ 1 ] = 'function' + args[ 1 ];
-                                                               mw.trackError( 'resourceloader.assert', { source: 'bug-T59567' } );
-                                                       }
                                                } catch ( e ) {
                                                        mw.trackError( 'resourceloader.exception', {
                                                                exception: e,