Skip to content

Commit 378d940

Browse files
committed
In main-thread async callbacks use HandleScope rather than EscapableHandleScope
1 parent 1790666 commit 378d940

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jones-ndb/impl/src/common/async_common.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ using namespace v8;
2727

2828

2929
void report_error(TryCatch * err) {
30-
EscapableHandleScope scope(Isolate::GetCurrent());
3130
String::Utf8Value exception(err->Exception());
3231
String::Utf8Value stack(err->StackTrace());
3332
Handle<Message> message = err->Message();
@@ -51,11 +50,12 @@ void work_thd_run(uv_work_t *req) {
5150

5251

5352
void main_thd_complete_async_call(AsyncCall *m) {
54-
EscapableHandleScope scope(Isolate::GetCurrent());
53+
v8::Isolate * isolate = Isolate::GetCurrent();
54+
HandleScope scope(isolate);
5555
v8::TryCatch try_catch;
5656
try_catch.SetVerbose(true);
5757

58-
m->doAsyncCallback(Isolate::GetCurrent()->GetCurrentContext()->Global());
58+
m->doAsyncCallback(isolate->GetCurrentContext()->Global());
5959

6060
/* exceptions */
6161
if(try_catch.HasCaught()) {

0 commit comments

Comments
 (0)