v8/include
Devlin Cronin 2ccd4dc564 Introduce Function::FunctionProtoToString()
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/+/2514768
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70976}
2020-11-05 00:38:40 +00:00
..
cppgc Reland "cppgc: Port backing store compaction." 2020-10-23 14:42:30 +00:00
libplatform [platform] Provide NewDefaultJobHandle function 2020-07-20 09:47:17 +00:00
APIDesign.md Move inspector protocol definitions to include/ 2019-06-18 17:59:36 +00:00
DEPS api: Add JSVisitor and JSMember reference 2020-07-07 13:48:31 +00:00
DIR_METADATA Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
js_protocol-1.2.json Move inspector protocol definitions to include/ 2019-06-18 17:59:36 +00:00
js_protocol-1.3.json Move inspector protocol definitions to include/ 2019-06-18 17:59:36 +00:00
js_protocol.pdl DevTools: add support for injecting bindings by context name 2020-10-01 17:20:04 +00:00
OWNERS Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
v8-cppgc.h cppgc: Replace JSMember by TracedReference 2020-10-27 14:46:56 +00:00
v8-fast-api-calls.h [fastcall] Turn the options pointer to a reference 2020-10-22 12:44:54 +00:00
v8-inspector-protocol.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-inspector.h Prepare for moving object description generation to blink (ValueMirror) 2020-10-29 09:39:11 +00:00
v8-internal.h [sandbox][x64] Add a type tag to external pointers 2020-10-09 15:39:44 +00:00
v8-metrics.h [wasm][ukm] Add tests for Wasm events (reland) 2020-09-24 12:05:27 +00:00
v8-platform.h [Jobs API] Rename !IsCompleted -> IsActive 2020-10-30 19:57:38 +00:00
v8-profiler.h Reland "cppgc-js: heap snapshot: Add logic for querying detachedness" 2020-10-29 09:18:21 +00:00
v8-unwinder-state.h [unwinder] Restore callee saved registers after unwinding in arm32 2020-10-20 12:32:09 +00:00
v8-util.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-value-serializer-version.h Expose the ValueSerializer data format version as a compile-time constant. 2017-04-27 15:14:41 +00:00
v8-version-string.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-version.h Update V8 version after branch cut 2020-10-01 14:28:52 +00:00
v8-wasm-trap-handler-posix.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-wasm-trap-handler-win.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8.h Introduce Function::FunctionProtoToString() 2020-11-05 00:38:40 +00:00
v8config.h [fastcall] Generalize fallback option for fast API calls 2020-10-20 08:14:09 +00:00