From 570269b73de713afcff712977d11a3910ed849ad Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 26 Nov 2018 14:20:16 -0500 Subject: Don't use snapshot for src/isolate.rs tests. --- libdeno/api.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libdeno/api.cc') diff --git a/libdeno/api.cc b/libdeno/api.cc index 6ee2c934f..c059bb534 100644 --- a/libdeno/api.cc +++ b/libdeno/api.cc @@ -36,6 +36,11 @@ Deno* deno_new(deno_buf snapshot, deno_buf shared, deno_recv_cb cb) { v8::MaybeLocal(), v8::DeserializeInternalFieldsCallback( deno::DeserializeInternalFields, nullptr)); + if (!snapshot.data_ptr) { + // If no snapshot is provided, we initialize the context with empty + // main source code and source maps. + deno::InitializeContext(isolate, context, "", "", ""); + } d->context_.Reset(isolate, context); } -- cgit v1.2.3