Update _super() to be safe when used with Backbone or Spina 2 objects.

Review Request #12901 — Created March 21, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

_super() has historically not been particularly safe, being dependent
on how prototype chains were constructed. We've had the occasional
problem in the past that it didn't deal with well. And its assumptions
about what constitutes a parent prototype didn't mesh well with Spina.

Fortunately, the version of Backbone we're now using in Review Board 6
explicitly sets a __super__ attribute that points to the proper
parent. The upcoming Spina 2 includes this as well. This gives us a safe
way of using this method when objects are instances of Backbone or
Spina 2-wrapped classes.

This fixes upcoming issues with some mixin classes when used with the
upcoming Spina 2.

All unit tests pass.

Verified this worked correctly during in-progress work for Spina 2.

Commits

Files