angular/packages/compiler/src/output
Bjarki 980f6a4958 fix(core): address Trusted Types bug in Chrome 83 (#40815)
In Chrome 83 passing a TrustedScript to eval just returns the
TrustedScript back without evaluating it, causing the
newTrustedFunctionFor{Dev,JIT} functions to fail. This is a browser bug
that has been fixed in Chrome 84, and only affects Angular applications
running with JIT (which includes unit tests).

As a temporary workaround for users still on Chrome 83, detect when this
occurs in the newTrustedFunctionFor* functions and fall back to the
straightforward, non-Trusted Types compatible implementation. The only
combination that is left affected consists of Angular applications
running with JIT, that have explicitly configured Trusted Types in
enforcement mode, with users that are still on Chrome 83.

Also correct docstring for newTrustedFunctionForJIT.

PR Close #40815
2021-02-12 16:59:58 -08:00
..
abstract_emitter.ts feat(compiler): support tagged template literals in code generator (#39122) 2020-12-07 16:20:04 -08:00
abstract_js_emitter.ts feat(compiler): support tagged template literals in code generator (#39122) 2020-12-07 16:20:04 -08:00
js_emitter.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
map_util.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
output_ast.ts feat(compiler): support tagged template literals in code generator (#39122) 2020-12-07 16:20:04 -08:00
output_interpreter.ts feat(compiler): support tagged template literals in code generator (#39122) 2020-12-07 16:20:04 -08:00
output_jit.ts fix(compiler): use Trusted Types policy in JIT compiler (#39210) 2020-10-16 08:13:14 -07:00
output_jit_trusted_types.ts fix(core): address Trusted Types bug in Chrome 83 (#40815) 2021-02-12 16:59:58 -08:00
source_map.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00
ts_emitter.ts refactor(compiler): remove extra imports (#37246) 2020-06-11 19:00:33 -07:00
value_util.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00