diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 71afbd7156..d5b68aa7c5 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -339,14 +339,6 @@ Handle Buffer::Utf8ByteLength(const Arguments &args) { } -bool Buffer::HasInstance(Handle val) { - if (!val->IsObject()) return false; - Local obj = val->ToObject(); - return constructor_template->HasInstance(obj); -} - - - void Buffer::Initialize(Handle target) { HandleScope scope; diff --git a/src/node_buffer.h b/src/node_buffer.h index ae3b6bfbff..78059be7ef 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -31,7 +31,11 @@ struct Blob_; class Buffer : public ObjectWrap { public: static void Initialize(v8::Handle target); - static bool HasInstance(v8::Handle val); + static inline bool HasInstance(v8::Handle val) { + if (!val->IsObject()) return false; + v8::Local obj = val->ToObject(); + return constructor_template->HasInstance(obj); + } const char* data() const { return data_; } size_t length() const { return length_; }