summaryrefslogtreecommitdiff
path: root/deps/v8/src/global-handles.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/global-handles.cc')
-rw-r--r--deps/v8/src/global-handles.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/deps/v8/src/global-handles.cc b/deps/v8/src/global-handles.cc
index 09449791f4..e06f794828 100644
--- a/deps/v8/src/global-handles.cc
+++ b/deps/v8/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) {
@@ -271,7 +273,7 @@ class GlobalHandles::Node {
}
// Absence of explicit cleanup or revival of weak handle
// in most of the cases would lead to memory leak.
- ASSERT(state() != NEAR_DEATH);
+ CHECK(state() != NEAR_DEATH);
return true;
}
@@ -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();
}