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

Unified Diff: test/cctest/test-weaktypedarrays.cc

Issue 16641003: Unify processing of weak lists in heap.cc (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 7 years, 6 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
« src/heap.cc ('K') | « src/serialize.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-weaktypedarrays.cc
diff --git a/test/cctest/test-weaktypedarrays.cc b/test/cctest/test-weaktypedarrays.cc
index aef610d4965c3b8d17c07bd8e1472fc789d55b3a..ead5734553cfc2fb2cd172e61356fece5eeb5541 100644
--- a/test/cctest/test-weaktypedarrays.cc
+++ b/test/cctest/test-weaktypedarrays.cc
@@ -44,7 +44,7 @@ static Isolate* GetIsolateFrom(LocalContext* context) {
static int CountArrayBuffersInWeakList(Heap* heap) {
int count = 0;
for (Object* o = heap->array_buffers_list();
- o != Smi::FromInt(0);
+ !o->IsUndefined();
o = JSArrayBuffer::cast(o)->weak_next()) {
count++;
}
@@ -54,7 +54,7 @@ static int CountArrayBuffersInWeakList(Heap* heap) {
static bool HasArrayBufferInWeakList(Heap* heap, JSArrayBuffer* ab) {
for (Object* o = heap->array_buffers_list();
- o != Smi::FromInt(0);
+ !o->IsUndefined();
o = JSArrayBuffer::cast(o)->weak_next()) {
if (ab == o) return true;
}
@@ -65,7 +65,7 @@ static bool HasArrayBufferInWeakList(Heap* heap, JSArrayBuffer* ab) {
static int CountTypedArrays(JSArrayBuffer* array_buffer) {
int count = 0;
for (Object* o = array_buffer->weak_first_array();
- o != Smi::FromInt(0);
+ !o->IsUndefined();
o = JSTypedArray::cast(o)->weak_next()) {
count++;
}
@@ -76,7 +76,7 @@ static int CountTypedArrays(JSArrayBuffer* array_buffer) {
static bool HasTypedArrayInWeakList(JSArrayBuffer* array_buffer,
JSTypedArray* ta) {
for (Object* o = array_buffer->weak_first_array();
- o != Smi::FromInt(0);
+ !o->IsUndefined();
o = JSTypedArray::cast(o)->weak_next()) {
if (ta == o) return true;
}
« src/heap.cc ('K') | « src/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698