[Trusted Types] Support eval(TT) when TT Is enforced.
Reintroduce the modifying hook with the new signature. Scripts are executed if both TT and CSP allow them, otherwise throw an EvalError and send reports as side-effects. Non-string, non-trusted values are passed through, and skip any TT default policy. eval(TT) still returns the object if TT enforcement is disabled, for now. This is because unconditional codegen from strings overrides our callback. Bug: 940927 Change-Id: I718694cc050cf071a2ccf9669543628cf568cbdc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768427 Commit-Queue: Stefano Sanfilippo <ssanfilippo@chromium.org> Reviewed-by:Mike West <mkwst@chromium.org> Reviewed-by:
Daniel Vogelheim <vogelheim@chromium.org> Cr-Commit-Position: refs/heads/master@{#714283}
Showing
Please register or sign in to comment