-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JSError: never fail with invalid getter target" (#1621)
Summary: Pull Request resolved: #1621 JS developers expect this to work and print "undefined": ```js function MyEror() { this.message = "MyError"; } MyError.prototype = Object.create(Error.prototype); try { throw new MyError(); } catch (e) { print(e.stack); } ``` We give it to them by preventing the getter from throwing errors. In V8 this is implemented differently by attaching the getter to the actual instance. Arguably, this makes sense, because property reads shouldn't throw. Add and update tests. - Grafted path static_h to hermes Reviewed By: avp Differential Revision: D69757360 fbshipit-source-id: 216e870e82c941a985020202dc14aa5948164da8
- Loading branch information
1 parent
da5aabc
commit c615b11
Showing
6 changed files
with
38 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters