diff --git a/native_mate/wrappable.cc b/native_mate/wrappable.cc index 589517e..2561985 100644 --- a/native_mate/wrappable.cc +++ b/native_mate/wrappable.cc @@ -23,7 +23,7 @@ WrappableBase::~WrappableBase() { wrapper_.Reset(); } -v8::Local WrappableBase::GetWrapper() { +v8::Local WrappableBase::GetWrapper() const { if (!wrapper_.IsEmpty()) return v8::Local::New(isolate_, wrapper_); else diff --git a/native_mate/wrappable_base.h b/native_mate/wrappable_base.h index ba0087f..11212c2 100644 --- a/native_mate/wrappable_base.h +++ b/native_mate/wrappable_base.h @@ -31,7 +31,7 @@ class WrappableBase { virtual ~WrappableBase(); // Retrieve the v8 wrapper object cooresponding to this object. - v8::Local GetWrapper(); + v8::Local GetWrapper() const; // Returns the Isolate this object is created in. v8::Isolate* isolate() const { return isolate_; }