Index: test/cctest/test-cpu-profiler.cc |
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc |
index 1cf750d46d427f68cfe4504092dd935c18b5120b..6ec71a2ab3e3bdb77717880200f044e0633b277c 100644 |
--- a/test/cctest/test-cpu-profiler.cc |
+++ b/test/cctest/test-cpu-profiler.cc |
@@ -1872,15 +1872,20 @@ TEST(CollectDeoptEvents) { |
{ |
const char* branch[] = {"", "opt_function0", "opt_function0"}; |
- CHECK_EQ(reason(i::DeoptimizeReason::kNotAHeapNumber), |
- GetBranchDeoptReason(env, iprofile, branch, arraysize(branch))); |
+ const char* deopt_reason = |
+ GetBranchDeoptReason(env, iprofile, branch, arraysize(branch)); |
+ if (deopt_reason != reason(i::DeoptimizeReason::kNotAHeapNumber) && |
+ deopt_reason != reason(i::DeoptimizeReason::kNotASmi)) { |
+ FATAL(deopt_reason); |
+ } |
} |
{ |
const char* branch[] = {"", "opt_function1", "opt_function1"}; |
const char* deopt_reason = |
GetBranchDeoptReason(env, iprofile, branch, arraysize(branch)); |
if (deopt_reason != reason(i::DeoptimizeReason::kNaN) && |
- deopt_reason != reason(i::DeoptimizeReason::kLostPrecisionOrNaN)) { |
+ deopt_reason != reason(i::DeoptimizeReason::kLostPrecisionOrNaN) && |
+ deopt_reason != reason(i::DeoptimizeReason::kNotASmi)) { |
FATAL(deopt_reason); |
} |
} |