@@ -616,20 +616,19 @@ void StatementSync::Iterate(const FunctionCallbackInfo<Value>& args) {
616616 return ;
617617 }
618618
619- Local<ObjectTemplate> iterableIteratorTemplate =
620- ObjectTemplate::New (isolate);
619+ Local<ObjectTemplate> iterableIteratorTemplate = ObjectTemplate::New (isolate);
621620
622621 IterateCaptureContext* captureContext = new IterateCaptureContext ();
623622 captureContext->num_cols = sqlite3_column_count (stmt->statement_ );
624623 captureContext->stmt = stmt;
625624 Local<FunctionTemplate> nextFuncTemplate =
626625 FunctionTemplate::New (isolate,
627- StatementSync::IterateNextCallback,
628- External::New (isolate, captureContext));
626+ StatementSync::IterateNextCallback,
627+ External::New (isolate, captureContext));
629628 Local<FunctionTemplate> returnFuncTemplate =
630629 FunctionTemplate::New (isolate,
631- StatementSync::IterateReturnCallback,
632- External::New (isolate, captureContext));
630+ StatementSync::IterateReturnCallback,
631+ External::New (isolate, captureContext));
633632
634633 iterableIteratorTemplate->Set (String::NewFromUtf8Literal (isolate, " next" ),
635634 nextFuncTemplate);
@@ -640,9 +639,18 @@ void StatementSync::Iterate(const FunctionCallbackInfo<Value>& args) {
640639 iterableIteratorTemplate->NewInstance (context).ToLocalChecked ();
641640
642641 Local<Object> global = context->Global ();
643- Local<Object> globalThis = global->Get (context, String::NewFromUtf8Literal (isolate, " globalThis" )).ToLocalChecked ().As <Object>();
644- Local<Object> JSIterator = globalThis->Get (context, String::NewFromUtf8Literal (isolate, " Iterator" )).ToLocalChecked ().As <Object>();
645- Local<Object> JSIteratorPrototype = JSIterator->Get (context, String::NewFromUtf8Literal (isolate, " prototype" )).ToLocalChecked ().As <Object>();
642+ Local<Object> globalThis =
643+ global->Get (context, String::NewFromUtf8Literal (isolate, " globalThis" ))
644+ .ToLocalChecked ()
645+ .As <Object>();
646+ Local<Object> JSIterator =
647+ globalThis->Get (context, String::NewFromUtf8Literal (isolate, " Iterator" ))
648+ .ToLocalChecked ()
649+ .As <Object>();
650+ Local<Object> JSIteratorPrototype =
651+ JSIterator->Get (context, String::NewFromUtf8Literal (isolate, " prototype" ))
652+ .ToLocalChecked ()
653+ .As <Object>();
646654
647655 iterableIterator->SetPrototype (context, JSIteratorPrototype).ToChecked ();
648656
0 commit comments