Page MenuHomePhabricator

Catch errors thrown in site module (MediaWiki:Common.js, etc.)
Closed, DeclinedPublic

Description

This is related to T71445 and the like (e.g. T71519)

We've had a couple of instances where common.js has been throwing exceptions is certain configurations (e.g. using a deprecated IE method in IE11 which caused T97788). If common.js crashes most people don't notice because it usually only disables a few progressive enhancements or browser bug workarounds, but more critical features such as VisualEditor or MediaViewer can suffer from these fatal exceptions.

These errors could be rethrown as warnings or logged.

Event Timeline

Esanders raised the priority of this task from to Needs Triage.
Esanders updated the task description. (Show Details)
Esanders subscribed.
Krinkle closed this task as Declined.EditedJul 29 2015, 2:06 AM
Krinkle claimed this task.

The site module has always been its own HTTP request (dedicated script tag) for legacy reasons. One side effect (that I intent to keep) is that its exceptions (syntax errors or runtime exceptions) don't affect any other call stacks. It's ignored.

The exceptions in Common.js aren't causing VE to fail. The exception is not interrupting VE's runtime at all.

What's happening is that ResourceLoader's state machine is not updating the site module's state from "loading" to "error", rather it stays pending indefinitely. If it reaches resolution (as either ready or error) then VE will automatically continue.

The module executor in ResourceLoader already catches all exceptions. There are no exceptions to that.

Closing in favour of T106736.

Legoktm renamed this task from Catch errors thrown in common.js to Catch errors thrown in site module (MediaWiki:Common.js, etc.).Jul 29 2015, 2:22 AM