GetWrapper should be const

This commit is contained in:
Cheng Zhao 2018-02-20 09:29:02 +09:00
parent a38fb5df41
commit 91ee99ab8a
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ WrappableBase::~WrappableBase() {
wrapper_.Reset();
}
v8::Local<v8::Object> WrappableBase::GetWrapper() {
v8::Local<v8::Object> WrappableBase::GetWrapper() const {
if (!wrapper_.IsEmpty())
return v8::Local<v8::Object>::New(isolate_, wrapper_);
else

View file

@ -31,7 +31,7 @@ class WrappableBase {
virtual ~WrappableBase();
// Retrieve the v8 wrapper object cooresponding to this object.
v8::Local<v8::Object> GetWrapper();
v8::Local<v8::Object> GetWrapper() const;
// Returns the Isolate this object is created in.
v8::Isolate* isolate() const { return isolate_; }