Merge pull request #19 from electron/get-wrapper-const

GetWrapper should be const
This commit is contained in:
Cheng Zhao 2018-02-20 10:07:55 +09:00 committed by GitHub
commit 99d9e262eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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_; }