| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1666a14 commit 6f3876c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -179,10 +179,12 @@ class WorkerThreadData { | |||
| 179 | 179 | isolate->SetStackLimit(w->stack_base_); | |
| 180 | 180 | ||
| 181 | 181 | HandleScope handle_scope(isolate); | |
| 182 | - isolate_data_.reset(CreateIsolateData(isolate, | ||
| 183 | - &loop_, | ||
| 184 | - w_->platform_, | ||
| 185 | - allocator.get())); | ||
| 182 | + isolate_data_.reset( | ||
| 183 | + CreateIsolateData(isolate, | ||
| 184 | + &loop_, | ||
| 185 | + w_->platform_, | ||
| 186 | + allocator.get(), | ||
| 187 | + w->snapshot_data()->AsEmbedderWrapper().get())); | ||
| 186 | 188 | CHECK(isolate_data_); | |
| 187 | 189 | if (w_->per_isolate_opts_) | |
| 188 | 190 | isolate_data_->set_options(std::move(w_->per_isolate_opts_)); | |
@@ -315,6 +317,10 @@ void Worker::Run() { | |||
| 315 | 317 | // though. | |
| 316 | 318 | TryCatch try_catch(isolate_); | |
| 317 | 319 | if (snapshot_data_ != nullptr) { | |
| 320 | + Debug(this, | ||
| 321 | + "Worker %llu uses context from snapshot %d\n", | ||
| 322 | + thread_id_.id, | ||
| 323 | + static_cast<int>(SnapshotData::kNodeBaseContextIndex)); | ||
| 318 | 324 | context = Context::FromSnapshot(isolate_, | |
| 319 | 325 | SnapshotData::kNodeBaseContextIndex) | |
| 320 | 326 | .ToLocalChecked(); | |
@@ -323,6 +329,8 @@ void Worker::Run() { | |||
| 323 | 329 | context = Local<Context>(); | |
| 324 | 330 | } | |
| 325 | 331 | } else { | |
| 332 | + Debug( | ||
| 333 | + this, "Worker %llu builds context from scratch\n", thread_id_.id); | ||
| 326 | 334 | context = NewContext(isolate_); | |
| 327 | 335 | } | |
| 328 | 336 | if (context.IsEmpty()) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments