Uh oh!
There was an error while loading. Please reload this page.
vm: return all own names and symbols in property enumerator - #54522
Conversation
joyeecheung
commented
Aug 23, 2024
The original behavior was something like this: Line 202 in 5737c21 When we still used a function template's instance template for the global object template. The |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #54522 +/- ##
==========================================
- Coverage 87.34% 87.31% -0.03%
==========================================
Files 649 649 Lines 182544 182759 +215 Branches 35030 35048 +18 ==========================================
+ Hits 159445 159579 +134 - Misses 16372 16459 +87 + Partials 6727 6721 -6
|
66475b7 to
d6f5838Comparelegendecas
commented
Aug 28, 2024
@joyeecheung On v18.8.0 where #44252 was not backported, the |
Yes, hence it was just done to keep it “look the same as before” (which matters when it gets logged by the console, etc. I don’t know how important it is though, maybe it’s fine to break the display name) |
d6f5838 to
eb35695CompareProperty enumerator methods like `Object.getOwnPropertyNames`, `Object.getOwnPropertySymbols`, and `Object.keys` all invokes the named property enumerator interceptor. V8 will filter the result based on the invoked enumerator variant. Fix the enumerator interceptor to return all potential properties.
eb35695 to
acf009bComparelegendecas
commented
Aug 29, 2024
I left @@toStringTag untouched being an exception as is. The breaking behavior can be a separate PR. This PR still fix inconsistency on @nodejs/vm @joyeecheung please take a look again, thanks! |
nodejs-github-bot
commented
Aug 29, 2024
nodejs-github-bot
commented
Aug 29, 2024
nodejs-github-bot
commented
Aug 30, 2024
Landed in d2479fa |
Property enumerator methods like `Object.getOwnPropertyNames`, `Object.getOwnPropertySymbols`, and `Object.keys` all invokes the named property enumerator interceptor. V8 will filter the result based on the invoked enumerator variant. Fix the enumerator interceptor to return all potential properties. PR-URL: #54522 Refs: jsdom/jsdom#3688 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Property enumerator methods like `Object.getOwnPropertyNames`, `Object.getOwnPropertySymbols`, and `Object.keys` all invokes the named property enumerator interceptor. V8 will filter the result based on the invoked enumerator variant. Fix the enumerator interceptor to return all potential properties. PR-URL: #54522 Refs: jsdom/jsdom#3688 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Property enumerator methods like
Object.getOwnPropertyNames,Object.getOwnPropertySymbols, andObject.keysall invokes thenamed property enumerator interceptor. V8 will filter the result based
on the invoked enumerator variant. Fix the enumerator interceptor to
return all potential properties.
Refs: jsdom/jsdom#3688
/cc @nodejs/vm