Perform 25% sampling on the client side as well

Needed because session IDs can be generated on the client
from the unload handler (when the back button is used).

Bug: T95919
Change-Id: Iac921bc36806205fc11ac76154ed8b3890f10d31
This commit is contained in:
Roan Kattouw 2015-04-28 14:55:54 -07:00
parent 7806fff4c4
commit cc5ca3a2f6

View file

@ -10,6 +10,13 @@
return; return;
} }
// Sample 25% (via hex digit)
// We have to do this on the client too because the unload handler
// can cause an editingSessionId to be generated on the client
if ( editingSessionId.charAt( 0 ) > '3' ) {
return;
}
mw.loader.using( 'schema.Edit' ).done( function () { mw.loader.using( 'schema.Edit' ).done( function () {
data = $.extend( { data = $.extend( {
version: 1, version: 1,