resourceloader: Remove redundant check in mw.loader.store for Opera 12

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
This commit is contained in:
Timo Tijhof 2018-08-24 04:08:06 +01:00
parent 2c7ff994aa
commit 07d8fded3e

View file

@ -2175,12 +2175,6 @@
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,