Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Original Author: [email protected] Original Git: 2eaa584 Original Reviewed By: avp Original Revision: D43642297 `instanceof`'s fast path is incorrect, it elides the lookup of `Symbol.hasInstance` if the RHS is a function, based on the reasoning that `Function.prototype[Symbol.hasInstance]` cannot be modified. However this is incorrect since you could still define `Symbol.hasInstance` on the function itself, or change the prototype of the function. NOTE: Porting required changes to nodelib for node-hermes because we were relying on the incorrect behavior. Switched to use new.target like the original file does. Reviewed By: neildhar Differential Revision: D60787313 fbshipit-source-id: 6a7be1cc2cc9a268ff424bb11c84e19327aae766
- Loading branch information