Currently, we do this via isRuntimeCodeGenEnabled whose single argument is equivalent to codeString in "Dynamic Code Brand Checks" spec [1]. We extend this hook to accept new parameters from that spec and adjust PerformEval and CreateDynamicFunction accordingly. We don't change the behavior for PerformShadowRealmEval [2] and WASM, i.e. we keep dummy parameters. [1] https://tc39.es/proposal-dynamic-code-brand-checks [2] https://github.com/tc39/proposal-shadowrealm/issues/414 Differential Revision: https://phabricator.services.mozilla.com/D229588