core: Add test for snapshotting from Rust (#2197)

This commit is contained in:
Ryan Dahl 2019-04-24 21:43:06 -04:00 committed by GitHub
parent f694823507
commit 7fc9d7d62a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 78 additions and 35 deletions

View file

@ -101,6 +101,7 @@ deno_snapshot deno_snapshot_new(Deno* d_) {
auto blob = d->snapshot_creator_->CreateBlob(
v8::SnapshotCreator::FunctionCodeHandling::kKeep);
d->has_snapshotted_ = true;
return {reinterpret_cast<uint8_t*>(const_cast<char*>(blob.data)),
blob.raw_size};
}