Commit e784cbd1 authored by Yang Guo's avatar Yang Guo Committed by V8 LUCI CQ

Add comment to startup snapshot

R=leszeks@chromium.org

Change-Id: I8e5930d9ed946ae12cad98b3456055aefcef7d18
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3386593
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78601}
parent cc3c93f1
...@@ -225,6 +225,7 @@ class V8_EXPORT Isolate { ...@@ -225,6 +225,7 @@ class V8_EXPORT Isolate {
/** /**
* Explicitly specify a startup snapshot blob. The embedder owns the blob. * Explicitly specify a startup snapshot blob. The embedder owns the blob.
* The embedder *must* ensure that the snapshot is from a trusted source.
*/ */
StartupData* snapshot_blob = nullptr; StartupData* snapshot_blob = nullptr;
......
...@@ -407,6 +407,7 @@ class V8_EXPORT ScriptCompiler { ...@@ -407,6 +407,7 @@ class V8_EXPORT ScriptCompiler {
class Source { class Source {
public: public:
// Source takes ownership of both CachedData and CodeCacheConsumeTask. // Source takes ownership of both CachedData and CodeCacheConsumeTask.
// The caller *must* ensure that the cached data is from a trusted source.
V8_INLINE Source(Local<String> source_string, const ScriptOrigin& origin, V8_INLINE Source(Local<String> source_string, const ScriptOrigin& origin,
CachedData* cached_data = nullptr, CachedData* cached_data = nullptr,
ConsumeCodeCacheTask* consume_cache_task = nullptr); ConsumeCodeCacheTask* consume_cache_task = nullptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment