Merge pull request #19 from electron/get-wrapper-const
GetWrapper should be const
This commit is contained in:
Коммит
99d9e262eb
|
@ -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
|
||||
|
|
|
@ -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_; }
|
||||
|
|
Загрузка…
Ссылка в новой задаче