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

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

Issue 1875263003: [api] Introduce ReturnValue::Get (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « src/heap/heap.h ('k') | no next file » | 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 379fe9c9c2810cc8fb8930c5a9766927f8f136ea..8887a8a976558d14ac1482b22968f2e2831a8719 100644
--- a/test/cctest/test-api.h
+++ b/test/cctest/test-api.h
@@ -18,6 +18,12 @@ static void CheckReturnValue(const T& t, i::Address callback) {
CHECK((*o)->IsTheHole() || (*o)->IsUndefined());
// Verify reset
bool is_runtime = (*o)->IsTheHole();
+ if (is_runtime) {
+ CHECK(rv.Get()->IsUndefined());
+ } else {
+ i::Handle<i::Object> v = v8::Utils::OpenHandle(*rv.Get());
+ CHECK_EQ(*v, *o);
+ }
rv.Set(true);
CHECK(!(*o)->IsTheHole() && !(*o)->IsUndefined());
rv.Set(v8::Local<v8::Object>());
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698