Bug 200735 - Error thrown during "acceptNode" lookup is overridden
Summary: Error thrown during "acceptNode" lookup is overridden
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Minor
Assignee: Nobody
URL: https://github.com/web-platform-tests...
Keywords: InRadar
Depends on: 200737
Blocks:
  Show dependency treegraph
 
Reported: 2019-08-14 14:09 PDT by Alexey Shvayka
Modified: 2019-08-14 23:12 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.42 KB, patch)
2019-08-14 21:21 PDT, Alexey Shvayka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Shvayka 2019-08-14 14:09:18 PDT
Test case:
```
let myError = {name: "test"};
let el = document.createElement("div"); el.append("node");
let walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT, {
    get acceptNode() { throw myError; }
});
walker.firstChild();
```

Actual:
TypeError is thrown

Expected:
myError is thrown

WPT: https://github.com/web-platform-tests/wpt/pull/15122
WebIDL: https://heycam.github.io/webidl/#call-a-user-objects-operation (step 10.2)

Both Firefox 68 and Chrome 76 throw correct error.
Comment 1 Alexey Shvayka 2019-08-14 21:21:16 PDT
Created attachment 376350 [details]
Patch
Comment 2 Ross Kirsling 2019-08-14 21:51:35 PDT
Comment on attachment 376350 [details]
Patch

r=me, as long as EWS is green
Comment 3 WebKit Commit Bot 2019-08-14 23:11:42 PDT
Comment on attachment 376350 [details]
Patch

Clearing flags on attachment: 376350

Committed r248708: <https://trac.webkit.org/changeset/248708>
Comment 4 WebKit Commit Bot 2019-08-14 23:11:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2019-08-14 23:12:16 PDT
<rdar://problem/54334630>