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

Unified Diff: src/global-handles.cc

Issue 175503003: Add safe interface for collections of UniquePersistent (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « src/global-handles.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.cc
diff --git a/src/global-handles.cc b/src/global-handles.cc
index 211bb1c77486bafd754a91854dabbf95355c8e14..e06f7948281fcb6fc95e364c9201266d0935fda1 100644
--- a/src/global-handles.cc
+++ b/src/global-handles.cc
@@ -235,10 +235,12 @@ class GlobalHandles::Node {
weak_callback_ = weak_callback;
}
- void ClearWeakness() {
+ void* ClearWeakness() {
ASSERT(state() != FREE);
+ void* p = parameter();
set_state(NORMAL);
set_parameter(NULL);
+ return p;
}
bool PostGarbageCollectionProcessing(Isolate* isolate) {
@@ -502,8 +504,8 @@ void GlobalHandles::MakeWeak(Object** location,
}
-void GlobalHandles::ClearWeakness(Object** location) {
- Node::FromLocation(location)->ClearWeakness();
+void* GlobalHandles::ClearWeakness(Object** location) {
+ return Node::FromLocation(location)->ClearWeakness();
}
« no previous file with comments | « src/global-handles.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698