Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: backport 3700a01c82 from upstream v8
Original commit message:

    Make v8::Eternal::Get and IsEmpty const.

    They do not modify the state of the handle.

    Review-Url: https://codereview.chromium.org/2753973002
    Cr-Commit-Position: refs/heads/master@{#43907}

Ref: v8/v8@3700a01c82
  • Loading branch information
jeremyroman authored and addaleax committed May 6, 2017
commit 501d5698c487f7a8f0b5a050c36ceb5591a5c5b7
9 changes: 4 additions & 5 deletions deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ template <class T> class Eternal {
Set(isolate, handle);
}
// Can only be safely called if already set.
V8_INLINE Local<T> Get(Isolate* isolate);
V8_INLINE bool IsEmpty() { return index_ == kInitialValue; }
V8_INLINE Local<T> Get(Isolate* isolate) const;
V8_INLINE bool IsEmpty() const { return index_ == kInitialValue; }
template<class S> V8_INLINE void Set(Isolate* isolate, Local<S> handle);

private:
Expand Down Expand Up @@ -8599,9 +8599,8 @@ void Eternal<T>::Set(Isolate* isolate, Local<S> handle) {
V8::Eternalize(isolate, reinterpret_cast<Value*>(*handle), &this->index_);
}


template<class T>
Local<T> Eternal<T>::Get(Isolate* isolate) {
template <class T>
Local<T> Eternal<T>::Get(Isolate* isolate) const {
return Local<T>(reinterpret_cast<T*>(*V8::GetEternal(isolate, index_)));
}

Expand Down