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 @@ -515,10 +515,6 @@ struct IterateCaptureContext {
515515 StatementSync* stmt;
516516};
517517
518- void IteratorFunc (const v8::FunctionCallbackInfo<v8::Value>& info) {
519- info.GetReturnValue ().Set (info.Holder ());
520- }
521-
522518void StatementSync::IterateReturnCallback (
523519 const FunctionCallbackInfo<Value>& args) {
524520 Environment* env = Environment::GetCurrent (args);
@@ -629,15 +625,11 @@ void StatementSync::Iterate(const FunctionCallbackInfo<Value>& args) {
629625 v8::FunctionTemplate::New (isolate,
630626 StatementSync::IterateReturnCallback,
631627 External::New (isolate, captureContext));
632- v8::Local<v8::FunctionTemplate> iteratorFuncTemplate =
633- v8::FunctionTemplate::New (isolate, IteratorFunc);
634628
635629 iterableIteratorTemplate->Set (String::NewFromUtf8Literal (isolate, " next" ),
636630 nextFuncTemplate);
637631 iterableIteratorTemplate->Set (String::NewFromUtf8Literal (isolate, " return" ),
638632 returnFuncTemplate);
639- iterableIteratorTemplate->Set (v8::Symbol::GetIterator (isolate),
640- iteratorFuncTemplate);
641633
642634 auto iterableIterator =
643635 iterableIteratorTemplate->NewInstance (context).ToLocalChecked ();
You can’t perform that action at this time.
0 commit comments