Fixes #4718
Merged
JA
3y ago+130+130+012345678901234567890123456789-25-25-01234567890123456789
What does this PR do?
fetch(), new Response, new Request are supposed to call getters for the request & response objects. Previously, we would skip calling getters if we knew it was a Request or Response object passed. But, this is incorrect. We have to call getters if it's not exactly the same type as the native type - for example, if they have a subclass or if they override method or url. We probably also need to do this for signal.
To make this work, this PR adds JSValue.asDirect to our bindings generator which checks if the JSValue has the same StructureID of the corresponding native type. If it does, we can skip the getters. If it does not, we cannot skip the getters.
Fixes #4718
How did you verify your code works?
There is a test