Skip to content

Commit c88ce39

Browse files
committed
Don't create context for recv callback
1 parent 7dd6b5d commit c88ce39

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

binding.cc

+2-3
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ int worker_send_bytes(worker* w, void* data, size_t len) {
230230
Isolate::Scope isolate_scope(w->isolate);
231231
HandleScope handle_scope(w->isolate);
232232

233-
Local<Context> context = Local<Context>::New(w->isolate, w->context);
234-
Context::Scope context_scope(context);
233+
auto context = w->context.Get(w->isolate);
235234

236235
TryCatch try_catch(w->isolate);
237236

@@ -326,7 +325,7 @@ worker* worker_new(int table_index) {
326325

327326
Local<Context> context = Context::New(w->isolate, NULL, global);
328327
w->context.Reset(w->isolate, context);
329-
// context->Enter();
328+
context->Enter();
330329

331330
return w;
332331
}

0 commit comments

Comments
 (0)