`Symbol.toStringTag` checks for proxies
Closed this issue · 2 comments
jdalton commented
This is just a todo to remember to address the Symbol.toStringTag
check for proxies. The issue is proxies will Object.prototype.toString.call(proxied)
as either an [object Object]
or a [object Function]
but not as anything else. In those cases the proxied
value will need to project a Symbol.toStringTag
value to cover it.
caridy commented
Additionally, this issue should also hide the function body when stringifying them across the membrane to produce the equivalent to native functions. The sandbox should never get access to the source of a function from the outer realm because the source might contain information (secrets) that they might be able to scrape out of the string value.