Update _super() to be safe when used with Backbone or Spina 2 objects.
Review Request #12901 — Created March 21, 2023 and submitted
_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.
Summary | ID |
---|---|
fbc983375e84b5adc0fbe8cc41e8c6a80ff083c5 |