diff --git a/TODO b/TODO index 69f57907..7ab72501 100644 --- a/TODO +++ b/TODO @@ -42,6 +42,10 @@ Polish the changes/last_row_id API of .run() reduce the number of memory copies +optimize binding by creating bind maps when statements and transactions are +created. This way, we can eliminate overhead caused by the NextAnonIndex() +and GetNamedParameterIndex() functions + if we promisify run(), get(), all(), or each(), their performance will suffer if more than 3 arguments are passed (more than 2 bound arguments for each()) diff --git a/src/binder/is-plain-object.cc b/src/binder/is-plain-object.cc index 1ac36e99..1581c429 100644 --- a/src/binder/is-plain-object.cc +++ b/src/binder/is-plain-object.cc @@ -2,6 +2,9 @@ bool Binder::IsPlainObject(v8::Local obj) { v8::Local proto = obj->GetPrototype(); + v8::Local ctx = obj->CreationContext(); + ctx->Enter(); v8::Local baseProto = Nan::New()->GetPrototype(); + ctx->Exit(); return proto->StrictEquals(baseProto) || proto->StrictEquals(Nan::Null()); }