Dropping the support means that JavaScript `instanceof` operator will return false when the contexts of the object and the constructor don't match, e.g. the object is from an iframe and the constructor is from the top window.
The change will initially be only on Nightly to make sure there won't be any significant breakages, and then will propagate to stable versions.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Note that for now code running with system principals still has the
hasInstance hook, so instanceof will still return true there if the
platform object and its interface's prototype object are from different
realms. We do plan to align to the behaviour from the spec everywhere in
the near future [1], but it involves fixing a lot of existing code/tests
[2].
We added an isInstance() static function on interface objects as a way
to do cross-realm branding checks a while back (only exposed in realms
running with system principals) [3]. New code running with system
principals that needs to do a cross-realm branding check should use for
example 'Node.isInstance(foo)', as opposed to 'foo instanceof Node'.