You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@arekinath ran into a case where ::jsprint wasn't printing the "ch_callback" property on an object even though it exists on the object. In the source, the property is unconditionally added in the constructor and never changed.
From Alex:
> a2da61c1::jsprint ch_callback
undefined
But if we look at the instance descriptors, it's there:
I dug into this a bit more and found that the reason mdb_v8 skips "ch_callback" is because its property type is not "field". The property type is indicated by the low bits (0x7) in the content field of the property descriptor, which is itself an SMI. In this case, the content field is d80504. As an SMI value, that's 6c0282, so those bits are just 2. Rather than being a property type FIELD, that's CONSTANT_FUNCTION. We'd have to dig into the V8 source a bit more to know for sure, but it seems like for this type of property, the value is just directly inside the instance descriptors and we can pull it out easily.
I'm not sure why V8 used this type of property here and we haven't seen this elsewhere, or if we just never noticed (which I find a little hard to believe).
There's a dump for this at /dap/stor/drop/core.16089.
The text was updated successfully, but these errors were encountered:
@arekinath ran into a case where ::jsprint wasn't printing the "ch_callback" property on an object even though it exists on the object. In the source, the property is unconditionally added in the constructor and never changed.
From Alex:
But if we look at the instance descriptors, it's there:
I found that if you use the undocumented "::jsprint -v", mdb_v8 reports that this is an object whose properties use the "properties" array:
but that only has a few property values, and definitely not the value of ch_callback:
I dug into this a bit more and found that the reason mdb_v8 skips "ch_callback" is because its property type is not "field". The property type is indicated by the low bits (0x7) in the content field of the property descriptor, which is itself an SMI. In this case, the content field is d80504. As an SMI value, that's 6c0282, so those bits are just 2. Rather than being a property type FIELD, that's CONSTANT_FUNCTION. We'd have to dig into the V8 source a bit more to know for sure, but it seems like for this type of property, the value is just directly inside the instance descriptors and we can pull it out easily.
I'm not sure why V8 used this type of property here and we haven't seen this elsewhere, or if we just never noticed (which I find a little hard to believe).
There's a dump for this at /dap/stor/drop/core.16089.
The text was updated successfully, but these errors were encountered: