| Index: gin/arguments.cc
|
| diff --git a/gin/arguments.cc b/gin/arguments.cc
|
| index 9eedfa3cd9e0250713528e6339edf4d9cd16d53f..284451479d5ebf8ea9181c6bac28a86847e97cc4 100644
|
| --- a/gin/arguments.cc
|
| +++ b/gin/arguments.cc
|
| @@ -9,9 +9,16 @@
|
|
|
| namespace gin {
|
|
|
| +Arguments::Arguments()
|
| + : isolate_(NULL),
|
| + info_(NULL),
|
| + next_(0),
|
| + insufficient_arguments_(false) {
|
| +}
|
| +
|
| Arguments::Arguments(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| : isolate_(info.GetIsolate()),
|
| - info_(info),
|
| + info_(&info),
|
| next_(0),
|
| insufficient_arguments_(false) {
|
| }
|
| @@ -20,9 +27,9 @@ Arguments::~Arguments() {
|
| }
|
|
|
| v8::Handle<v8::Value> Arguments::PeekNext() {
|
| - if (next_ >= info_.Length())
|
| + if (next_ >= info_->Length())
|
| return v8::Handle<v8::Value>();
|
| - return info_[next_];
|
| + return (*info_)[next_];
|
| }
|
|
|
| void Arguments::ThrowError() {
|
| @@ -38,4 +45,10 @@ void Arguments::ThrowTypeError(const std::string& message) {
|
| StringToV8(isolate_, message)));
|
| }
|
|
|
| +template<>
|
| +bool Arguments::GetNext<Arguments>(Arguments* out) {
|
| + *out = *this;
|
| + return true;
|
| +}
|
| +
|
| } // namespace gin
|
|
|