Open MattMenke2 opened 3 years ago
Thanks for the report! Exposing sizes of low-level native objects such as file handles is not the intention of the API. I tried to expressed that in Section 2.2: the result must include only the memory related to the web platform objects.
I think we can strengthen the requirements for the implementation-defined algorithm there to disallow exposing OS/hardware/driver dependent information. Chrome's implementation fulfills that requirement.
It was not clear to me that a "web platform object" couldn't own/contain a platform object.
The spec claims "The result of the API depends only on the objects allocated by the web page itself and does not include unrelated memory such as the baseline memory usage of an empty web page. This means the same user agent binary running on two different devices should produce the same results for a fixed web page." - this seems not necessarily true. If the size of native objects (e.g., file handles overhead, GPU-managed array overhead, etc), then it seems like size could vary between devices based on OS version/hardware/drivers. It's unclear to me whether the size of these platform-allocated objects could be included in the values returned by the API.