Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: include/v8.h

Issue 2753973002: Make v8::Eternal::Get and IsEmpty const. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index d7b7205ef0a0b18e341343875f614ca18fed6610..b45ab4e61527bd0bd497ee79ce4e308fb1a7977f 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -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:
@@ -8637,9 +8637,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_)));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698