| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 6bea3eaefee603ed7bc02a56be251082ba6ad27a..7f4b1ba743109e63b7e29b5876a3aa48314dafcc 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -14403,7 +14403,6 @@ int SetFunctionEntryHookTest::CountInvocations(
|
| return invocations;
|
| }
|
|
|
| -
|
| void SetFunctionEntryHookTest::RunLoopInNewEnv(v8::Isolate* isolate) {
|
| v8::HandleScope outer(isolate);
|
| v8::Local<Context> env = Context::New(isolate);
|
| @@ -14461,10 +14460,19 @@ void SetFunctionEntryHookTest::RunTest() {
|
|
|
| RunLoopInNewEnv(isolate);
|
|
|
| - // Check the exepected invocation counts.
|
| - CHECK_EQ(2, CountInvocations(NULL, "bar"));
|
| - CHECK_EQ(200, CountInvocations("bar", "foo"));
|
| - CHECK_EQ(200, CountInvocations(NULL, "foo"));
|
| + // Check the expected invocation counts.
|
| + if (!i::FLAG_ignition) {
|
| + CHECK_EQ(2, CountInvocations(NULL, "bar"));
|
| + CHECK_EQ(200, CountInvocations("bar", "foo"));
|
| + CHECK_EQ(200, CountInvocations(NULL, "foo"));
|
| + } else {
|
| + // For ignition we don't see the actual functions being called, instead
|
| + // we see the IterpreterEntryTrampoline at least 102 times
|
| + // (100 unoptimized calls to foo, and 2 calls to bar).
|
| + CHECK_LE(102, CountInvocations(NULL, "InterpreterEntryTrampoline"));
|
| + // We should also see the calls to the optimized function foo.
|
| + CHECK_EQ(100, CountInvocations(NULL, "foo"));
|
| + }
|
|
|
| // Verify that we have an entry hook on some specific stubs.
|
| CHECK_NE(0, CountInvocations(NULL, "CEntryStub"));
|
|
|