File tree 2 files changed +2
-16
lines changed
2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
const {
3
- SafeArrayIterator,
4
3
globalThis,
5
4
} = primordials ;
6
5
@@ -9,13 +8,8 @@ const { emitExperimentalWarning } = require('internal/util');
9
8
emitExperimentalWarning ( 'SQLite' ) ;
10
9
module . exports = internalBinding ( 'sqlite' ) ;
11
10
12
- const { Iterator} = globalThis ;
11
+ const { Iterator } = globalThis ;
13
12
const statementIterate = module . exports . StatementSync . prototype . iterate ;
14
13
module . 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 ) ) ;
21
15
} ;
Original file line number Diff line number Diff line change @@ -474,10 +474,6 @@ struct IterateCaptureContext {
474
474
StatementSync* stmt;
475
475
};
476
476
477
- void IteratorFunc (const v8::FunctionCallbackInfo<v8::Value>& info) {
478
- info.GetReturnValue ().Set (info.Holder ());
479
- }
480
-
481
477
void StatementSync::IterateReturnCallback (
482
478
const FunctionCallbackInfo<Value>& args) {
483
479
Environment* env = Environment::GetCurrent (args);
@@ -588,15 +584,11 @@ void StatementSync::Iterate(const FunctionCallbackInfo<Value>& args) {
588
584
v8::FunctionTemplate::New (isolate,
589
585
StatementSync::IterateReturnCallback,
590
586
External::New (isolate, captureContext));
591
- v8::Local<v8::FunctionTemplate> iteratorFuncTemplate =
592
- v8::FunctionTemplate::New (isolate, IteratorFunc);
593
587
594
588
iterableIteratorTemplate->Set (String::NewFromUtf8Literal (isolate, " next" ),
595
589
nextFuncTemplate);
596
590
iterableIteratorTemplate->Set (String::NewFromUtf8Literal (isolate, " return" ),
597
591
returnFuncTemplate);
598
- iterableIteratorTemplate->Set (v8::Symbol::GetIterator (isolate),
599
- iteratorFuncTemplate);
600
592
601
593
auto iterableIterator =
602
594
iterableIteratorTemplate->NewInstance (context).ToLocalChecked ();
You can’t perform that action at this time.
0 commit comments