• Stefano Sanfilippo's avatar
    [compiler, api] Allow modifying codegen hook to block non-strings. · 6c0825aa
    Stefano Sanfilippo authored
    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/+/1776082Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Reviewed-by: 's avatarDaniel Vogelheim <vogelheim@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Stefano Sanfilippo <ssanfilippo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#64763}
    6c0825aa
Name
Last commit
Last update
..
libplatform Loading commit data...
APIDesign.md Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...
js_protocol-1.2.json Loading commit data...
js_protocol-1.3.json Loading commit data...
js_protocol.pdl Loading commit data...
v8-inspector-protocol.h Loading commit data...
v8-inspector.h Loading commit data...
v8-internal.h Loading commit data...
v8-platform.h Loading commit data...
v8-profiler.h Loading commit data...
v8-testing.h Loading commit data...
v8-util.h Loading commit data...
v8-value-serializer-version.h Loading commit data...
v8-version-string.h Loading commit data...
v8-version.h Loading commit data...
v8-wasm-trap-handler-posix.h Loading commit data...
v8-wasm-trap-handler-win.h Loading commit data...
v8.h Loading commit data...
v8config.h Loading commit data...