Index: test/cctest/test-api-interceptors.cc |
diff --git a/test/cctest/test-api-interceptors.cc b/test/cctest/test-api-interceptors.cc |
index e4ee4395676bbaaa94f9b8149548abc3b90a61dc..161eb0c7c471640e4e0b7b4c785f7292f2457a12 100644 |
--- a/test/cctest/test-api-interceptors.cc |
+++ b/test/cctest/test-api-interceptors.cc |
@@ -2536,7 +2536,8 @@ static int interceptor_call_count = 0; |
static void InterceptorICRefErrorGetter( |
Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { |
ApiTestFuzzer::Fuzz(); |
- if (v8_str("x")->Equals(name) && interceptor_call_count++ < 20) { |
+ if (!is_bootstrapping && v8_str("x")->Equals(name) && |
+ interceptor_call_count++ < 20) { |
info.GetReturnValue().Set(call_ic_function2); |
} |
} |
@@ -2551,9 +2552,9 @@ THREADED_TEST(InterceptorICReferenceErrors) { |
v8::Handle<v8::ObjectTemplate> templ = ObjectTemplate::New(isolate); |
templ->SetHandler( |
v8::NamedPropertyHandlerConfiguration(InterceptorICRefErrorGetter)); |
- interceptor_call_count = -100000; // Generous limit for bootstrapping. |
+ is_bootstrapping = true; |
LocalContext context(0, templ, v8::Handle<Value>()); |
- interceptor_call_count = 0; |
+ is_bootstrapping = false; |
call_ic_function2 = v8_compile("function h(x) { return x; }; h")->Run(); |
v8::Handle<Value> value = CompileRun( |
"function f() {" |
@@ -2582,6 +2583,7 @@ static int interceptor_ic_exception_get_count = 0; |
static void InterceptorICExceptionGetter( |
Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { |
ApiTestFuzzer::Fuzz(); |
+ if (is_bootstrapping) return; |
if (v8_str("x")->Equals(name) && ++interceptor_ic_exception_get_count < 20) { |
info.GetReturnValue().Set(call_ic_function3); |
} |
@@ -2600,11 +2602,9 @@ THREADED_TEST(InterceptorICGetterExceptions) { |
v8::HandleScope scope(isolate); |
v8::Handle<v8::ObjectTemplate> templ = ObjectTemplate::New(isolate); |
// Generous limit for bootstrapping. |
Jakob Kummerow
2015/07/01 16:08:39
nit: outdated comment
|
- interceptor_ic_exception_get_count = -100000; |
templ->SetHandler( |
v8::NamedPropertyHandlerConfiguration(InterceptorICExceptionGetter)); |
LocalContext context(0, templ, v8::Handle<Value>()); |
- interceptor_ic_exception_get_count = 0; |
call_ic_function3 = v8_compile("function h(x) { return x; }; h")->Run(); |
v8::Handle<Value> value = CompileRun( |
"function f() {" |