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

Unified Diff: src/global-handles.h

Issue 22795004: abstract eternal into class (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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
Index: src/global-handles.h
diff --git a/src/global-handles.h b/src/global-handles.h
index 2c20711ea179594abffd515f4abc6a19e3b5dcb8..fe1375af00a8d353a9610c6e62b19e8b96953033 100644
--- a/src/global-handles.h
+++ b/src/global-handles.h
@@ -396,8 +396,8 @@ class EternalHandles {
int NumberOfHandles() { return size_; }
- // Create an EternalHandle, returning the index.
- int Create(Isolate* isolate, Object* object);
+ // Create an EternalHandle, overwriting the index.
+ void Create(Isolate* isolate, Object* object, int* index);
rossberg 2013/08/12 15:13:13 Same here.
// Grab the handle for an existing EternalHandle.
inline Handle<Object> Get(int index) {
@@ -419,8 +419,7 @@ class EternalHandles {
Handle<Object> CreateSingleton(Isolate* isolate,
Object* object,
SingletonHandle singleton) {
- ASSERT(singleton_handles_[singleton] == kInvalidIndex);
- singleton_handles_[singleton] = Create(isolate, object);
+ Create(isolate, object, &singleton_handles_[singleton]);
return Get(singleton_handles_[singleton]);
}

Powered by Google App Engine
This is Rietveld 408576698