Commit Detail
Commit c9767be
Add regression test for Object.getOwnPropertyDescriptors with JSG_INSPECT_PROPERTY Regression test for https://github.com/cloudflare/workerd/issues/4147. Object.getOwnPropertyDescriptors() on a JSG prototype with JSG_INSPECT_PROPERTY used to throw "Illegal invocation" because registerInspectProperty() used SetNativeDataProperty on the prototype. V8 would invoke the native getter callback during descriptor retrieval to produce a data descriptor value, and the callback's HasInstance check would fail because the prototype object is not an instance of the type. Fixed by PR #6003 (c43c98ac8), which changed registerInspectProperty() to use SetAccessorProperty instead. Assisted-by: Claude
Files changed
1 file changed~1 modified