Revision: 16037
Author: [email protected]
Date: Sun Aug 4 23:58:48 2013
Log: IsNearDeath needs to include pending nodes
[email protected]
BUG=
Review URL: https://codereview.chromium.org/21466003
http://code.google.com/p/v8/source/detail?r=16037
Modified:
/branches/bleeding_edge/include/v8.h
/branches/bleeding_edge/src/global-handles.cc
=======================================
--- /branches/bleeding_edge/include/v8.h Fri Aug 2 06:03:06 2013
+++ /branches/bleeding_edge/include/v8.h Sun Aug 4 23:58:48 2013
@@ -5457,6 +5457,7 @@
static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
static const int kNodeStateMask = 0xf;
static const int kNodeStateIsWeakValue = 2;
+ static const int kNodeStateIsPendingValue = 3;
static const int kNodeStateIsNearDeathValue = 4;
static const int kNodeIsIndependentShift = 4;
static const int kNodeIsPartiallyDependentShift = 5;
@@ -5672,8 +5673,10 @@
bool Persistent<T>::IsNearDeath() const {
typedef internal::Internals I;
if (this->IsEmpty()) return false;
- return I::GetNodeState(reinterpret_cast<internal::Object**>(this->val_))
==
- I::kNodeStateIsNearDeathValue;
+ uint8_t node_state =
+ I::GetNodeState(reinterpret_cast<internal::Object**>(this->val_));
+ return node_state == I::kNodeStateIsNearDeathValue ||
+ node_state == I::kNodeStateIsPendingValue;
}
=======================================
--- /branches/bleeding_edge/src/global-handles.cc Wed Jul 24 05:50:53 2013
+++ /branches/bleeding_edge/src/global-handles.cc Sun Aug 4 23:58:48 2013
@@ -71,6 +71,7 @@
STATIC_ASSERT(static_cast<int>(NodeState::kMask) ==
Internals::kNodeStateMask);
STATIC_ASSERT(WEAK == Internals::kNodeStateIsWeakValue);
+ STATIC_ASSERT(PENDING == Internals::kNodeStateIsPendingValue);
STATIC_ASSERT(NEAR_DEATH == Internals::kNodeStateIsNearDeathValue);
STATIC_ASSERT(static_cast<int>(IsIndependent::kShift) ==
Internals::kNodeIsIndependentShift);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.