File tree Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22const {
3- SafeArrayIterator,
43 globalThis,
54} = primordials ;
65
@@ -9,13 +8,8 @@ const { emitExperimentalWarning } = require('internal/util');
98emitExperimentalWarning ( 'SQLite' ) ;
109module . exports = internalBinding ( 'sqlite' ) ;
1110
12- const { Iterator} = globalThis ;
11+ const { Iterator } = globalThis ;
1312const statementIterate = module . exports . StatementSync . prototype . iterate ;
1413module . exports . StatementSync . prototype . iterate = function iterate ( ) {
15- return new SafeArrayIterator ( statementIterate . apply ( this , arguments ) ) ;
16- return statementIterate . apply ( this , arguments ) ;
17- return Iterator . from (
18- statementIterate . apply ( this , arguments )
19- // new SafeArrayIterator(statementIterate.apply(this, arguments))
20- ) ;
14+ return Iterator . from ( statementIterate . apply ( this , arguments ) ) ;
2115} ;
Original file line number Diff line number Diff line change @@ -474,10 +474,6 @@ struct IterateCaptureContext {
474474 StatementSync* stmt;
475475};
476476
477- void IteratorFunc (const v8::FunctionCallbackInfo<v8::Value>& info) {
478- info.GetReturnValue ().Set (info.Holder ());
479- }
480-
481477void StatementSync::IterateReturnCallback (
482478 const FunctionCallbackInfo<Value>& args) {
483479 Environment* env = Environment::GetCurrent (args);
@@ -588,15 +584,11 @@ void StatementSync::Iterate(const FunctionCallbackInfo<Value>& args) {
588584 v8::FunctionTemplate::New (isolate,
589585 StatementSync::IterateReturnCallback,
590586 External::New (isolate, captureContext));
591- v8::Local<v8::FunctionTemplate> iteratorFuncTemplate =
592- v8::FunctionTemplate::New (isolate, IteratorFunc);
593587
594588 iterableIteratorTemplate->Set (String::NewFromUtf8Literal (isolate, " next" ),
595589 nextFuncTemplate);
596590 iterableIteratorTemplate->Set (String::NewFromUtf8Literal (isolate, " return" ),
597591 returnFuncTemplate);
598- iterableIteratorTemplate->Set (v8::Symbol::GetIterator (isolate),
599- iteratorFuncTemplate);
600592
601593 auto iterableIterator =
602594 iterableIteratorTemplate->NewInstance (context).ToLocalChecked ();
You can’t perform that action at this time.
0 commit comments