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

Unified Diff: test/cctest/test-api.h

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 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
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/unittests/interpreter/constant-array-builder-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.h
diff --git a/test/cctest/test-api.h b/test/cctest/test-api.h
index 8887a8a976558d14ac1482b22968f2e2831a8719..f91fe91a4d1aa79b23f4c0e43c5d61937fb3fa52 100644
--- a/test/cctest/test-api.h
+++ b/test/cctest/test-api.h
@@ -14,10 +14,11 @@ static void CheckReturnValue(const T& t, i::Address callback) {
v8::ReturnValue<v8::Value> rv = t.GetReturnValue();
i::Object** o = *reinterpret_cast<i::Object***>(&rv);
CHECK_EQ(CcTest::isolate(), t.GetIsolate());
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(t.GetIsolate());
CHECK_EQ(t.GetIsolate(), rv.GetIsolate());
- CHECK((*o)->IsTheHole() || (*o)->IsUndefined());
+ CHECK((*o)->IsTheHole(isolate) || (*o)->IsUndefined(isolate));
// Verify reset
- bool is_runtime = (*o)->IsTheHole();
+ bool is_runtime = (*o)->IsTheHole(isolate);
if (is_runtime) {
CHECK(rv.Get()->IsUndefined());
} else {
@@ -25,11 +26,10 @@ static void CheckReturnValue(const T& t, i::Address callback) {
CHECK_EQ(*v, *o);
}
rv.Set(true);
- CHECK(!(*o)->IsTheHole() && !(*o)->IsUndefined());
+ CHECK(!(*o)->IsTheHole(isolate) && !(*o)->IsUndefined(isolate));
rv.Set(v8::Local<v8::Object>());
- CHECK((*o)->IsTheHole() || (*o)->IsUndefined());
+ CHECK((*o)->IsTheHole(isolate) || (*o)->IsUndefined(isolate));
CHECK_EQ(is_runtime, (*o)->IsTheHole());
- i::Isolate* isolate = reinterpret_cast<i::Isolate*>(t.GetIsolate());
// If CPU profiler is active check that when API callback is invoked
// VMState is set to EXTERNAL.
if (isolate->cpu_profiler()->is_profiling()) {
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/unittests/interpreter/constant-array-builder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698