Commit ead412ec authored by Maciej Goszczycki's avatar Maciej Goszczycki Committed by Commit Bot

[cleanup] Use CHECK_EQ in test-heap-profiler.cc where possible

Bug: v8:8834
Change-Id: Iac747d915f50c64bb91ca7b8365a51d96eacd2ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549161Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Cr-Commit-Position: refs/heads/master@{#60596}
parent 9baee14c
......@@ -1849,26 +1849,26 @@ TEST(GetHeapValueForNode) {
CHECK(heap_profiler->FindObjectById(global->GetId())->IsObject());
v8::Local<v8::Object> js_global =
env->Global()->GetPrototype().As<v8::Object>();
CHECK(js_global == heap_profiler->FindObjectById(global->GetId()));
CHECK_EQ(js_global, heap_profiler->FindObjectById(global->GetId()));
const v8::HeapGraphNode* obj =
GetProperty(env->GetIsolate(), global, v8::HeapGraphEdge::kProperty, "a");
CHECK(heap_profiler->FindObjectById(obj->GetId())->IsObject());
v8::Local<v8::Object> js_obj = js_global->Get(env.local(), v8_str("a"))
.ToLocalChecked()
.As<v8::Object>();
CHECK(js_obj == heap_profiler->FindObjectById(obj->GetId()));
CHECK_EQ(js_obj, heap_profiler->FindObjectById(obj->GetId()));
const v8::HeapGraphNode* s_prop = GetProperty(
env->GetIsolate(), obj, v8::HeapGraphEdge::kProperty, "s_prop");
v8::Local<v8::String> js_s_prop = js_obj->Get(env.local(), v8_str("s_prop"))
.ToLocalChecked()
.As<v8::String>();
CHECK(js_s_prop == heap_profiler->FindObjectById(s_prop->GetId()));
CHECK_EQ(js_s_prop, heap_profiler->FindObjectById(s_prop->GetId()));
const v8::HeapGraphNode* n_prop = GetProperty(
env->GetIsolate(), obj, v8::HeapGraphEdge::kProperty, "n_prop");
v8::Local<v8::String> js_n_prop = js_obj->Get(env.local(), v8_str("n_prop"))
.ToLocalChecked()
.As<v8::String>();
CHECK(js_n_prop == heap_profiler->FindObjectById(n_prop->GetId()));
CHECK_EQ(js_n_prop, heap_profiler->FindObjectById(n_prop->GetId()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment