Revision: 16517
Author:   [email protected]
Date:     Wed Sep  4 08:19:14 2013 UTC
Log:      invert Eternal::IsEmpty logic

[email protected]
BUG=v8:2870

Review URL: https://codereview.chromium.org/23914004
http://code.google.com/p/v8/source/detail?r=16517

Modified:
 /branches/bleeding_edge/include/v8.h
 /branches/bleeding_edge/test/cctest/test-global-handles.cc

=======================================
--- /branches/bleeding_edge/include/v8.h        Wed Sep  4 07:45:36 2013 UTC
+++ /branches/bleeding_edge/include/v8.h        Wed Sep  4 08:19:14 2013 UTC
@@ -458,7 +458,7 @@
   }
   // Can only be safely called if already set.
   V8_INLINE(Local<T> Get(Isolate* isolate));
-  V8_INLINE(bool IsEmpty()) { return index_ != kInitialValue; }
+  V8_INLINE(bool IsEmpty()) { return index_ == kInitialValue; }
   template<class S>
   V8_INLINE(void Set(Isolate* isolate, Local<S> handle));

=======================================
--- /branches/bleeding_edge/test/cctest/test-global-handles.cc Mon Aug 26 10:11:43 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-global-handles.cc Wed Sep 4 08:19:14 2013 UTC
@@ -338,9 +338,9 @@
     eternal_handles->Create(
         isolate, *v8::Utils::OpenHandle(*object), &indices[i]);
     // Create with external api
-    CHECK(!eternals[i].IsEmpty());
+    CHECK(eternals[i].IsEmpty());
     eternals[i].Set(v8_isolate, object);
-    CHECK(eternals[i].IsEmpty());
+    CHECK(!eternals[i].IsEmpty());
   }

   isolate->heap()->CollectAllAvailableGarbage();
@@ -370,7 +370,7 @@
     HandleScope scope(isolate);
     v8::Local<v8::Object> object = v8::Object::New();
     v8::Eternal<v8::Object> eternal(v8_isolate, object);
-    CHECK(eternal.IsEmpty());
+    CHECK(!eternal.IsEmpty());
     CHECK(object == eternal.Get(v8_isolate));
   }

--
--
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.

Reply via email to