• Devlin Cronin's avatar
    Introduce Function::FunctionProtoToString() · 2ccd4dc5
    Devlin Cronin authored
    Add a new function on the public API to allow serializing a function to
    a string using the built-in toString() implementation, allowing
    serialization without worrying about untrusted author script overriding
    the toString() implementation. This is similar in nature to
    Object::ObjectProtoToString() (but that only returns "[object Function]"
    for any passed function).
    
    Add tests for the same.
    
    Bug: chromium:1144841
    Change-Id: Ie4c29b870034c0817c23bf91f9424f956098823d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2514768Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70976}
    2ccd4dc5
Name
Last commit
Last update
..
cppgc Loading commit data...
libplatform Loading commit data...
APIDesign.md Loading commit data...
DEPS Loading commit data...
DIR_METADATA 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-cppgc.h Loading commit data...
v8-fast-api-calls.h Loading commit data...
v8-inspector-protocol.h Loading commit data...
v8-inspector.h Loading commit data...
v8-internal.h Loading commit data...
v8-metrics.h Loading commit data...
v8-platform.h Loading commit data...
v8-profiler.h Loading commit data...
v8-unwinder-state.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...