Page MenuHomePhabricator

mediawiki.legacy.wikibits exception: defineProperty is not supported on DOM Objects
Closed, ResolvedPublic

Description

Spotted in UploadWizard's client-side error logging: there is a bunch of defineProperty is not supported on DOM Objects exceptions from module-execute in mediawiki.legacy.wikibits. User agents are mostly Safari 4 and 5 on Macs and Mobile Safari 7 on Blackberries.

Event Timeline

This is probably from all of the mw.log.deprecate( win, … ) calls (or the one mw.log.deprecate( document, … ) call).

mw.log.deprecate should have a better check for defineProperty support (it just does !Object.defineProperty), or wrap the whole thing in try…catch falling back to simple property setting.

Change 313602 had a related patch set uploaded (by Bartosz Dziewoński):
Ignore defineProperty() failures in mw.log.deprecate

https://gerrit.wikimedia.org/r/313602

For reference, the SQL query to see the exact user-agents: (run on stat1003)

use log;
select * from UploadWizardExceptionFlowEvent_11772722
where event_message = 'defineProperty is not supported on DOM Objects';

Change 313602 merged by jenkins-bot:
Ignore defineProperty() failures in mw.log.deprecate

https://gerrit.wikimedia.org/r/313602

Krinkle claimed this task.
Krinkle moved this task from Inbox to Assigned on the MediaWiki-ResourceLoader board.

@Krinkle There are reports that is issue is not restricted to just Safari 5.0 so I backport to REL1_27 LTS may be a good idea?

@matmarex Perhaps you have an opinion on this. Thanks!

Change 318208 had a related patch set uploaded (by Krinkle):
Ignore defineProperty() failures in mw.log.deprecate

https://gerrit.wikimedia.org/r/318208

Change 318208 merged by jenkins-bot:
Ignore defineProperty() failures in mw.log.deprecate

https://gerrit.wikimedia.org/r/318208