Updated mediawiki/extensions
Project: mediawiki/extensions/VisualEditor  bfc87b6d08d55efda6586ad1a38f04e427418325

Don't change config during toolbar setup

Problem: When the toolbar is created twice with the same config object,
the second time around the tools are still bound to the old surface

Reason: The tool config is overwritten such that symbolic names of tools
are replaced with instances of tools, bound to a specific surface. The
second time around, the creation fails (silently in a try-catch) and then
the already translated list of tools is used to create a new toolbar
filled with old tools still bound to the wrong surface.

Solution: Leave the config object alone, and instead build a new list of
tool instances while iterating through tool names.

Bonus: Don't fail silently. Using a try-catch to detect whether a
requested tool is supported masks other errors, and is evil. Instead,
just do a lookup and skip tools in which the lookup's result is falsey.

Change-Id: Ic43ec29173e556592bb3db9399ff83787e0a6857