6c0825aaa7
Instead of inferring allow_codegen from the state of MaybeLocal<String>, return it separately. This allows to distinguish "could not stringify this object" from "block execution of this object", regardless of whether the object is a string or not. Currently, the hook can trigger an EvalError only if the original source was a string. Modify the logic so that one of the three mechanisms (unconditional, non-modifying, modifying) decides alone. Before, if the non-modifying callback rejected a value, the value would be forwarded to the modifying callback, but the unconditional would not forward to the non-modifying callback. This introduces a more uniform behaviour where the three mechanisms act in decreasing priority. Change-Id: Iaaa9873227052653d714df65f31c4de914f48b7d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1776082 Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Stefano Sanfilippo <ssanfilippo@chromium.org> Cr-Commit-Position: refs/heads/master@{#64763} |
||
---|---|---|
.. | ||
libplatform | ||
APIDesign.md | ||
DEPS | ||
js_protocol-1.2.json | ||
js_protocol-1.3.json | ||
js_protocol.pdl | ||
OWNERS | ||
v8-inspector-protocol.h | ||
v8-inspector.h | ||
v8-internal.h | ||
v8-platform.h | ||
v8-profiler.h | ||
v8-testing.h | ||
v8-util.h | ||
v8-value-serializer-version.h | ||
v8-version-string.h | ||
v8-version.h | ||
v8-wasm-trap-handler-posix.h | ||
v8-wasm-trap-handler-win.h | ||
v8.h | ||
v8config.h |