Loading...
Searching...
No Matches
v8-script.h
Go to the documentation of this file.
1// Copyright 2021 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef INCLUDE_V8_SCRIPT_H_
6#define INCLUDE_V8_SCRIPT_H_
7
8#include <stddef.h>
9#include <stdint.h>
10
11#include <memory>
12#include <span>
13#include <tuple>
14#include <vector>
15
16#include "v8-callbacks.h" // NOLINT(build/include_directory)
17#include "v8-data.h" // NOLINT(build/include_directory)
18#include "v8-local-handle.h" // NOLINT(build/include_directory)
19#include "v8-maybe.h" // NOLINT(build/include_directory)
20#include "v8-message.h" // NOLINT(build/include_directory)
21#include "v8config.h" // NOLINT(build/include_directory)
22
23namespace v8 {
24
25class Function;
26class Message;
27class Object;
28class PrimitiveArray;
29class Script;
30
31namespace internal {
32class BackgroundDeserializeTask;
33struct ScriptStreamingData;
34} // namespace internal
35
43 public:
49
55};
56
61 public:
66
67 /*
68 * A unique id.
69 */
70 int ScriptId() const;
71 V8_DEPRECATE_SOON("Use ScriptId")
72 int GetId() const;
73
74 Local<Value> GetScriptName();
75
79 Local<Value> GetSourceURL();
83 Local<Value> GetSourceMappingURL();
84
89 int GetLineNumber(int code_pos = 0);
90
95 int GetColumnNumber(int code_pos = 0);
96
97 static const int kNoScriptId = 0;
98};
99
104 public:
113
114 /*
115 * A unique id.
116 */
117 int ScriptId() const;
118
119 static const int kNoScriptId = 0;
120};
121
122static_assert(UnboundModuleScript::kNoScriptId == UnboundScript::kNoScriptId);
123
128 public:
129 int GetLineNumber() { return line_number_; }
130 int GetColumnNumber() { return column_number_; }
131
132 Location(int line_number, int column_number)
133 : line_number_(line_number), column_number_(column_number) {}
134
135 private:
136 int line_number_;
137 int column_number_;
138};
139
141 public:
146
151
156 int GetSourceOffset() const;
157
172
173 V8_DEPRECATED("Use GetImportAttributes instead")
174 Local<FixedArray> GetImportAssertions() const {
175 return GetImportAttributes();
176 }
177
178 V8_INLINE static ModuleRequest* Cast(Data* data);
179
180 private:
181 static void CheckCast(Data* obj);
182};
183
187class V8_EXPORT Module : public Data {
188 public:
196 enum Status {
202 kErrored
203 };
204
211
216
221
226
232
236 int GetIdentityHash() const;
237
239 Local<Context> context, Local<String> specifier,
240 Local<FixedArray> import_attributes, Local<Module> referrer);
242 Local<Context> context, Local<String> specifier,
243 Local<FixedArray> import_attributes, Local<Module> referrer);
244
246 Local<Context> context, size_t module_request_index,
247 Local<Module> referrer);
249 Local<Context> context, size_t module_request_index,
250 Local<Module> referrer);
251
260 Local<Context> context, ResolveModuleCallback module_callback,
261 ResolveSourceCallback source_callback = nullptr);
262
270 Local<Context> context, ResolveModuleByIndexCallback module_callback,
271 ResolveSourceByIndexCallback source_callback = nullptr);
272
284
296 Local<Context> context);
297
305
313
319 int ScriptId() const;
320
327 bool IsGraphAsync() const;
328
334 bool HasTopLevelAwait() const;
335
339 bool IsSourceTextModule() const;
340
344 bool IsSyntheticModule() const;
345
346 /*
347 * Callback defined in the embedder. This is responsible for setting
348 * the module's exported values with calls to SetSyntheticModuleExport().
349 * The callback must return a resolved Promise to indicate success (where no
350 * exception was thrown) and return an empy MaybeLocal to indicate falure
351 * (where an exception was thrown).
352 */
355
364 Isolate* isolate, Local<String> module_name,
365 const std::span<const Local<String>>& export_names,
366 SyntheticModuleEvaluationSteps evaluation_steps,
367 Local<Data> host_defined_options = Local<Data>());
368
374
383 Isolate* isolate, Local<String> export_name, Local<Value> export_value);
384
392 std::pair<LocalVector<Module>, LocalVector<Message>>
394
395 V8_INLINE static Module* Cast(Data* data);
396
397 private:
398 static void CheckCast(Data* obj);
399};
400
402 public:
406 std::vector<int> GetCompileHints(Isolate* isolate) const;
407};
408
413class V8_EXPORT Script : public Data {
414 public:
419 Local<Context> context, Local<String> source,
420 ScriptOrigin* origin = nullptr);
421
429 Local<Data> host_defined_options);
430
435
439 int ScriptId() const;
440
446
451 V8_DEPRECATE_SOON("Use GetCompileHintsCollector instead")
452 std::vector<int> GetProducedCompileHints() const;
453
459 Local<CompileHintsCollector> GetCompileHintsCollector() const;
460};
461
463
468 public:
470
479 enum BufferPolicy { BufferNotOwned, BufferOwned };
480
482 : data(nullptr),
483 length(0),
484 rejected(false),
485 buffer_policy(BufferNotOwned) {}
486
487 // If buffer_policy is BufferNotOwned, the caller keeps the ownership of
488 // data and guarantees that it stays alive until the CachedData object is
489 // destroyed. If the policy is BufferOwned, the given data will be deleted
490 // (with delete[]) when the CachedData object is destroyed.
491 CachedData(const uint8_t* data, int length,
492 BufferPolicy buffer_policy = BufferNotOwned);
494
496 // Don't change order/existing values of this enum since it keys into the
497 // `code_cache_reject_reason` histogram. Append-only!
499 kMagicNumberMismatch = 1,
500 kVersionMismatch = 2,
501 kSourceMismatch = 3,
502 kFlagsMismatch = 5,
503 kChecksumMismatch = 6,
504 kInvalidHeader = 7,
505 kLengthMismatch = 8,
506 kReadOnlySnapshotChecksumMismatch = 9,
507
508 // This should always point at the last real enum value.
509 kLast = kReadOnlySnapshotChecksumMismatch
510 };
511
512 // Check if the CachedData can be loaded in the given isolate.
514
515 // TODO(marja): Async compilation; add constructors which take a callback
516 // which will be called when V8 no longer needs the data.
517 const uint8_t* data;
521
522 // Prevent copying.
523 CachedData(const CachedData&) = delete;
524 CachedData& operator=(const CachedData&) = delete;
525 };
526
528 // V8 did not attempt to find this script in its in-memory cache.
529 kNotAttempted,
530
531 // V8 found a previously compiled copy of this script in its in-memory
532 // cache. Any data generated by a streaming compilation or background
533 // deserialization was abandoned.
534 kHit,
535
536 // V8 didn't have any previously compiled data for this script.
537 kMiss,
538
539 // V8 had some previously compiled data for an identical script, but the
540 // data was incomplete.
541 kPartial,
542 };
543
544 // Details about what happened during a compilation.
546 InMemoryCacheResult in_memory_cache_result =
547 InMemoryCacheResult::kNotAttempted;
548
549 static constexpr int64_t kTimeNotMeasured = -1;
550 int64_t foreground_time_in_microseconds = kTimeNotMeasured;
551 int64_t background_time_in_microseconds = kTimeNotMeasured;
552 };
553
557 class Source {
558 public:
559 // Source takes ownership of both CachedData and CodeCacheConsumeTask.
560 // The caller *must* ensure that the cached data is from a trusted source.
561 V8_INLINE Source(Local<String> source_string, const ScriptOrigin& origin,
562 CachedData* cached_data = nullptr,
563 ConsumeCodeCacheTask* consume_cache_task = nullptr);
564 // Source takes ownership of both CachedData and CodeCacheConsumeTask.
565 V8_INLINE explicit Source(
566 Local<String> source_string, CachedData* cached_data = nullptr,
567 ConsumeCodeCacheTask* consume_cache_task = nullptr);
568 V8_INLINE Source(Local<String> source_string, const ScriptOrigin& origin,
569 CompileHintCallback callback, void* callback_data);
570 V8_INLINE ~Source() = default;
571
572 // Ownership of the CachedData or its buffers is *not* transferred to the
573 // caller. The CachedData object is alive as long as the Source object is
574 // alive.
575 V8_INLINE const CachedData* GetCachedData() const;
576
577 V8_INLINE const ScriptOriginOptions& GetResourceOptions() const;
578
579 V8_INLINE const CompilationDetails& GetCompilationDetails() const;
580
581 private:
582 friend class ScriptCompiler;
583
584 Local<String> source_string;
585
586 // Origin information
587 Local<Value> resource_name;
588 int resource_line_offset = -1;
589 int resource_column_offset = -1;
590 ScriptOriginOptions resource_options;
591 Local<Value> source_map_url;
592 Local<Data> host_defined_options;
593
594 // Cached data from previous compilation (if a kConsume*Cache flag is
595 // set), or hold newly generated cache data (kProduce*Cache flags) are
596 // set when calling a compile method.
597 std::unique_ptr<CachedData> cached_data;
598 std::unique_ptr<ConsumeCodeCacheTask> consume_cache_task;
599
600 // For requesting compile hints from the embedder.
601 CompileHintCallback compile_hint_callback = nullptr;
602 void* compile_hint_callback_data = nullptr;
603
604 // V8 writes this data and never reads it. It exists only to be informative
605 // to the embedder.
606 CompilationDetails compilation_details;
607 };
608
614 public:
615 virtual ~ExternalSourceStream() = default;
616
638 virtual size_t GetMoreData(const uint8_t** src) = 0;
639 };
640
648 public:
649 enum Encoding { ONE_BYTE, TWO_BYTE, UTF8, WINDOWS_1252 };
650
651 StreamedSource(std::unique_ptr<ExternalSourceStream> source_stream,
652 Encoding encoding);
654
655 internal::ScriptStreamingData* impl() const { return impl_.get(); }
656
657 // Prevent copying.
660
661 CompilationDetails& compilation_details() { return compilation_details_; }
662
663 private:
664 std::unique_ptr<internal::ScriptStreamingData> impl_;
665
666 // V8 writes this data and never reads it. It exists only to be informative
667 // to the embedder.
668 CompilationDetails compilation_details_;
669 };
670
676 public:
677 void Run();
678
679 private:
680 friend class ScriptCompiler;
681
682 explicit ScriptStreamingTask(internal::ScriptStreamingData* data)
683 : data_(data) {}
684
685 internal::ScriptStreamingData* data_;
686 };
687
694 public:
696
697 void Run();
698
712 void SourceTextAvailable(Isolate* isolate, Local<String> source_text,
713 const ScriptOrigin& origin);
714
721
728
729 private:
730 friend class ScriptCompiler;
731
732 explicit ConsumeCodeCacheTask(
733 std::unique_ptr<internal::BackgroundDeserializeTask> impl);
734
735 std::unique_ptr<internal::BackgroundDeserializeTask> impl_;
736 };
737
739 kNoCompileOptions = 0,
740 kConsumeCodeCache = 1 << 0,
741 kEagerCompile = 1 << 1,
742 kProduceCompileHints = 1 << 2,
743 kConsumeCompileHints = 1 << 3,
744 kFollowCompileHintsMagicComment = 1 << 4,
745 kFollowCompileHintsPerFunctionMagicComment = 1 << 5,
746 };
747
748 static inline bool CompileOptionsIsValid(CompileOptions compile_options) {
749 // kConsumeCodeCache is mutually exclusive with all other flag bits.
750 if ((compile_options & kConsumeCodeCache) &&
751 compile_options != kConsumeCodeCache) {
752 return false;
753 }
754 // kEagerCompile is mutually exclusive with all other flag bits.
755 if ((compile_options & kEagerCompile) && compile_options != kEagerCompile) {
756 return false;
757 }
758 // We don't currently support producing and consuming compile hints at the
759 // same time.
760 constexpr int produce_and_consume = CompileOptions::kProduceCompileHints |
761 CompileOptions::kConsumeCompileHints;
762 if ((compile_options & produce_and_consume) == produce_and_consume) {
763 return false;
764 }
765 return true;
766 }
767
772 kNoCacheNoReason = 0,
789 };
790
806 Isolate* isolate, Source* source,
807 CompileOptions options = kNoCompileOptions,
808 NoCacheReason no_cache_reason = kNoCacheNoReason);
809
822 Local<Context> context, Source* source,
823 CompileOptions options = kNoCompileOptions,
824 NoCacheReason no_cache_reason = kNoCacheNoReason);
825
838 Isolate* isolate, StreamedSource* source,
839 ScriptType type = ScriptType::kClassic,
840 CompileOptions options = kNoCompileOptions,
841 CompileHintCallback compile_hint_callback = nullptr,
842 void* compile_hint_callback_data = nullptr);
843
845 Isolate* isolate, std::unique_ptr<CachedData> source);
847 Isolate* isolate, std::unique_ptr<CachedData> source);
848
857 Local<Context> context, StreamedSource* source,
858 Local<String> full_source_string, const ScriptOrigin& origin);
859
878 static uint32_t CachedDataVersionTag();
879
888 Isolate* isolate, Source* source,
889 CompileOptions options = kNoCompileOptions,
890 NoCacheReason no_cache_reason = kNoCacheNoReason);
891
900 Local<Context> context, StreamedSource* v8_source,
901 Local<String> full_source_string, const ScriptOrigin& origin);
902
914 Local<Context> context, Source* source, size_t arguments_count = 0,
915 Local<String> arguments[] = nullptr, size_t context_extension_count = 0,
916 Local<Object> context_extensions[] = nullptr,
917 CompileOptions options = kNoCompileOptions,
918 NoCacheReason no_cache_reason = kNoCacheNoReason);
919
926
933 Local<UnboundModuleScript> unbound_module_script);
934
942
943 private:
944 static V8_WARN_UNUSED_RESULT MaybeLocal<UnboundScript> CompileUnboundInternal(
945 Isolate* isolate, Source* source, CompileOptions options,
946 NoCacheReason no_cache_reason);
947
948 static V8_WARN_UNUSED_RESULT MaybeLocal<Function> CompileFunctionInternal(
949 Local<Context> context, Source* source, size_t arguments_count,
950 Local<String> arguments[], size_t context_extension_count,
951 Local<Object> context_extensions[], CompileOptions options,
952 NoCacheReason no_cache_reason,
953 Local<ScriptOrModule>* script_or_module_out);
954};
955
956ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin,
957 CachedData* data,
958 ConsumeCodeCacheTask* consume_cache_task)
959 : source_string(string),
960 resource_name(origin.ResourceName()),
961 resource_line_offset(origin.LineOffset()),
962 resource_column_offset(origin.ColumnOffset()),
963 resource_options(origin.Options()),
964 source_map_url(origin.SourceMapUrl()),
965 host_defined_options(origin.GetHostDefinedOptions()),
966 cached_data(data),
967 consume_cache_task(consume_cache_task) {}
968
970 ConsumeCodeCacheTask* consume_cache_task)
971 : source_string(string),
972 cached_data(data),
973 consume_cache_task(consume_cache_task) {}
974
976 CompileHintCallback callback,
977 void* callback_data)
978 : source_string(string),
979 resource_name(origin.ResourceName()),
980 resource_line_offset(origin.LineOffset()),
981 resource_column_offset(origin.ColumnOffset()),
982 resource_options(origin.Options()),
983 source_map_url(origin.SourceMapUrl()),
984 host_defined_options(origin.GetHostDefinedOptions()),
985 compile_hint_callback(callback),
986 compile_hint_callback_data(callback_data) {}
987
989 const {
990 return cached_data.get();
991}
992
994 return resource_options;
995}
996
999 return compilation_details;
1000}
1001
1003#ifdef V8_ENABLE_CHECKS
1004 CheckCast(data);
1005#endif
1006 return reinterpret_cast<ModuleRequest*>(data);
1007}
1008
1010#ifdef V8_ENABLE_CHECKS
1011 CheckCast(data);
1012#endif
1013 return reinterpret_cast<Module*>(data);
1014}
1015
1016} // namespace v8
1017
1018#endif // INCLUDE_V8_SCRIPT_H_
Definition: v8-script.h:401
std::vector< int > GetCompileHints(Isolate *isolate) const
Definition: v8-data.h:18
Definition: v8-data.h:77
Definition: v8-isolate.h:291
Definition: v8-local-handle.h:594
Definition: v8-local-handle.h:366
Definition: v8-script.h:127
int GetLineNumber()
Definition: v8-script.h:129
Location(int line_number, int column_number)
Definition: v8-script.h:132
int GetColumnNumber()
Definition: v8-script.h:130
Definition: v8-local-handle.h:734
Definition: v8-maybe.h:39
Definition: v8-script.h:140
static ModuleRequest * Cast(Data *data)
Definition: v8-script.h:1002
Local< FixedArray > GetImportAttributes() const
Local< String > GetSpecifier() const
ModuleImportPhase GetPhase() const
int GetSourceOffset() const
Definition: v8-script.h:187
Local< Value > GetResourceName() const
Location SourceOffsetToLocation(int offset) const
MaybeLocal< Value > Evaluate(Local< Context > context)
MaybeLocal< Value > EvaluateForImportDefer(Local< Context > context)
Maybe< bool > InstantiateModule(Local< Context > context, ResolveModuleByIndexCallback module_callback, ResolveSourceByIndexCallback source_callback=nullptr)
Maybe< bool > SetSyntheticModuleExport(Isolate *isolate, Local< String > export_name, Local< Value > export_value)
Local< FixedArray > GetModuleRequests() const
bool IsGraphAsync() const
bool HasTopLevelAwait() const
int ScriptId() const
Status GetStatus() const
bool IsSyntheticModule() const
Local< Value > GetException() const
static Local< Module > CreateSyntheticModule(Isolate *isolate, Local< String > module_name, const std::span< const Local< String > > &export_names, SyntheticModuleEvaluationSteps evaluation_steps, Local< Data > host_defined_options=Local< Data >())
std::pair< LocalVector< Module >, LocalVector< Message > > GetStalledTopLevelAwaitMessages(Isolate *isolate)
Status
Definition: v8-script.h:196
@ kInstantiating
Definition: v8-script.h:198
@ kInstantiated
Definition: v8-script.h:199
@ kUninstantiated
Definition: v8-script.h:197
@ kEvaluating
Definition: v8-script.h:200
@ kEvaluated
Definition: v8-script.h:201
int GetIdentityHash() const
Local< UnboundModuleScript > GetUnboundModuleScript()
Local< Value > GetModuleNamespace(v8::ModuleImportPhase phase=v8::ModuleImportPhase::kEvaluation)
static Module * Cast(Data *data)
Definition: v8-script.h:1009
Maybe< bool > InstantiateModule(Local< Context > context, ResolveModuleCallback module_callback, ResolveSourceCallback source_callback=nullptr)
bool IsSourceTextModule() const
Local< Data > GetSyntheticModuleHostDefinedOptions() const
Definition: v8-script.h:693
void SourceTextAvailable(Isolate *isolate, Local< String > source_text, const ScriptOrigin &origin)
Definition: v8-script.h:613
virtual size_t GetMoreData(const uint8_t **src)=0
Definition: v8-script.h:675
Definition: v8-script.h:557
Source(Local< String > source_string, const ScriptOrigin &origin, CachedData *cached_data=nullptr, ConsumeCodeCacheTask *consume_cache_task=nullptr)
Definition: v8-script.h:956
const CompilationDetails & GetCompilationDetails() const
Definition: v8-script.h:998
const CachedData * GetCachedData() const
Definition: v8-script.h:988
const ScriptOriginOptions & GetResourceOptions() const
Definition: v8-script.h:993
Definition: v8-script.h:647
internal::ScriptStreamingData * impl() const
Definition: v8-script.h:655
Encoding
Definition: v8-script.h:649
CompilationDetails & compilation_details()
Definition: v8-script.h:661
StreamedSource & operator=(const StreamedSource &)=delete
StreamedSource(const StreamedSource &)=delete
StreamedSource(std::unique_ptr< ExternalSourceStream > source_stream, Encoding encoding)
Definition: v8-script.h:467
static CachedData * CreateCodeCacheForFunction(Local< Function > function)
static MaybeLocal< Function > CompileFunction(Local< Context > context, Source *source, size_t arguments_count=0, Local< String > arguments[]=nullptr, size_t context_extension_count=0, Local< Object > context_extensions[]=nullptr, CompileOptions options=kNoCompileOptions, NoCacheReason no_cache_reason=kNoCacheNoReason)
InMemoryCacheResult
Definition: v8-script.h:527
static bool CompileOptionsIsValid(CompileOptions compile_options)
Definition: v8-script.h:748
static CachedData * CreateCodeCache(Local< UnboundModuleScript > unbound_module_script)
NoCacheReason
Definition: v8-script.h:771
@ kNoCacheBecausePacScript
Definition: v8-script.h:783
@ kNoCacheBecauseV8Extension
Definition: v8-script.h:781
@ kNoCacheBecauseStreamingSource
Definition: v8-script.h:777
@ kNoCacheBecauseNoResource
Definition: v8-script.h:774
@ kNoCacheBecauseInlineScriptCacheTooCold
Definition: v8-script.h:788
@ kNoCacheBecauseStaticCodeCache
Definition: v8-script.h:787
@ kNoCacheBecauseInspector
Definition: v8-script.h:778
@ kNoCacheBecauseCacheTooCold
Definition: v8-script.h:780
@ kNoCacheBecauseScriptTooSmall
Definition: v8-script.h:779
@ kNoCacheBecauseCachingDisabled
Definition: v8-script.h:773
@ kNoCacheBecauseDeferredProduceCodeCache
Definition: v8-script.h:786
@ kNoCacheBecauseExtensionModule
Definition: v8-script.h:782
@ kNoCacheBecauseInlineScript
Definition: v8-script.h:775
@ kNoCacheBecauseInDocumentWrite
Definition: v8-script.h:784
@ kNoCacheBecauseModule
Definition: v8-script.h:776
@ kNoCacheBecauseResourceWithNoCacheHandler
Definition: v8-script.h:785
static ConsumeCodeCacheTask * StartConsumingCodeCacheOnBackground(Isolate *isolate, std::unique_ptr< CachedData > source)
static CachedData * CreateCodeCache(Local< UnboundScript > unbound_script)
static MaybeLocal< Module > CompileModule(Local< Context > context, StreamedSource *v8_source, Local< String > full_source_string, const ScriptOrigin &origin)
CompileOptions
Definition: v8-script.h:738
static MaybeLocal< Script > Compile(Local< Context > context, StreamedSource *source, Local< String > full_source_string, const ScriptOrigin &origin)
static MaybeLocal< Script > Compile(Local< Context > context, Source *source, CompileOptions options=kNoCompileOptions, NoCacheReason no_cache_reason=kNoCacheNoReason)
static ScriptStreamingTask * StartStreaming(Isolate *isolate, StreamedSource *source, ScriptType type=ScriptType::kClassic, CompileOptions options=kNoCompileOptions, CompileHintCallback compile_hint_callback=nullptr, void *compile_hint_callback_data=nullptr)
static uint32_t CachedDataVersionTag()
static MaybeLocal< UnboundScript > CompileUnboundScript(Isolate *isolate, Source *source, CompileOptions options=kNoCompileOptions, NoCacheReason no_cache_reason=kNoCacheNoReason)
static ConsumeCodeCacheTask * StartConsumingCodeCache(Isolate *isolate, std::unique_ptr< CachedData > source)
static MaybeLocal< Module > CompileModule(Isolate *isolate, Source *source, CompileOptions options=kNoCompileOptions, NoCacheReason no_cache_reason=kNoCacheNoReason)
Definition: v8-script.h:42
Local< Value > GetResourceName()
Local< Data > HostDefinedOptions()
Definition: v8-message.h:29
Definition: v8-message.h:63
Definition: v8-script.h:413
static MaybeLocal< Script > Compile(Local< Context > context, Local< String > source, ScriptOrigin *origin=nullptr)
MaybeLocal< Value > Run(Local< Context > context)
Local< UnboundScript > GetUnboundScript()
int ScriptId() const
MaybeLocal< Value > Run(Local< Context > context, Local< Data > host_defined_options)
Local< Value > GetResourceName()
Definition: v8-script.h:103
Local< Value > GetSourceURL()
Local< Value > GetSourceMappingURL()
Definition: v8-script.h:60
int ScriptId() const
Local< Script > BindToCurrentContext()
Definition: v8-value.h:32
Definition: libplatform.h:15
bool(*)(int, void *) CompileHintCallback
Definition: v8-callbacks.h:435
ModuleImportPhase
Definition: v8-callbacks.h:352
ScriptType
Definition: v8-script.h:462
Definition: v8-script.h:478
BufferPolicy buffer_policy
Definition: v8-script.h:520
const uint8_t * data
Definition: v8-script.h:517
CachedData(const CachedData &)=delete
CompatibilityCheckResult
Definition: v8-script.h:495
bool rejected
Definition: v8-script.h:519
CachedData(const uint8_t *data, int length, BufferPolicy buffer_policy=BufferNotOwned)
BufferPolicy
Definition: v8-script.h:479
@ BufferNotOwned
Definition: v8-script.h:479
CachedData()
Definition: v8-script.h:481
int length
Definition: v8-script.h:518
CompatibilityCheckResult CompatibilityCheck(Isolate *isolate)
CachedData & operator=(const CachedData &)=delete
Definition: v8-script.h:545
#define V8_EXPORT
Definition: v8config.h:867
#define V8_INLINE
Definition: v8config.h:511
#define V8_DEPRECATE_SOON(message)
Definition: v8config.h:624
#define V8_DEPRECATED(message)
Definition: v8config.h:616
#define V8_WARN_UNUSED_RESULT
Definition: v8config.h:681