Call NodeFilter.acceptNode() with correct this value

Per WebIDL, a callback interface's operation should be called with
object that implements the interface as this, unless the provided object
itself is used as the function to call, in which case it should be called
with this=undefined (by default, allowing for overridden by the algorithm
that makes the call.)

The code calling NodeFilter.acceptNode() always used the context's global
object as this. Note that when this=undefined and the function called is
not compiled in strict mode, the actual this value seen by the function
will still be the global object.

BUG=419548

Review URL: https://codereview.chromium.org/932633002

git-svn-id: svn://svn.chromium.org/blink/trunk@190299 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed
tree: 2b39fd5b4a30d5f76fe5f8045d104800d4bc2528
  1. third_party/