File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 2727#include " node_buffer.h"
2828#include " node_errors.h"
2929#include " node_internals.h"
30+ #include " node_snapshot_builder.h"
3031#include " node_v8_platform-inl.h"
3132#include " string_bytes.h"
3233#include " uv.h"
@@ -677,13 +678,16 @@ Local<String> UnionBytes::ToStringChecked(Isolate* isolate) const {
677678 }
678679}
679680
680- RAIIIsolate::RAIIIsolate ()
681+ RAIIIsolate::RAIIIsolate (const SnapshotData* data )
681682 : allocator_{ArrayBuffer::Allocator::NewDefaultAllocator ()} {
682683 isolate_ = Isolate::Allocate ();
683684 CHECK_NOT_NULL (isolate_);
684685 per_process::v8_platform.Platform ()->RegisterIsolate (isolate_,
685686 uv_default_loop ());
686687 Isolate::CreateParams params;
688+ if (data != nullptr ) {
689+ SnapshotBuilder::InitializeIsolateParams (data, ¶ms);
690+ }
687691 params.array_buffer_allocator = allocator_.get ();
688692 Isolate::Initialize (isolate_, params);
689693}
Original file line number Diff line number Diff line change @@ -971,7 +971,7 @@ void SetConstructorFunction(v8::Isolate* isolate,
971971// Simple RAII class to spin up a v8::Isolate instance.
972972class RAIIIsolate {
973973 public:
974- RAIIIsolate ();
974+ explicit RAIIIsolate (const SnapshotData* data = nullptr );
975975 ~RAIIIsolate ();
976976
977977 v8::Isolate* get () const { return isolate_; }
You can’t perform that action at this time.
0 commit comments