GetNext should have no side effect when failed

This commit is contained in:
Cheng Zhao 2015-08-12 21:31:31 +08:00
parent b6c353ee80
commit 7160054927

View file

@ -36,8 +36,11 @@ class Arguments {
insufficient_arguments_ = true; insufficient_arguments_ = true;
return false; return false;
} }
v8::Local<v8::Value> val = (*info_)[next_++]; v8::Local<v8::Value> val = (*info_)[next_];
return ConvertFromV8(isolate_, val, out); bool success = ConvertFromV8(isolate_, val, out);
if (success)
next_++;
return success;
} }
template<typename T> template<typename T>