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

Unified Diff: test/cctest/test-api-interceptors.cc

Issue 1220053002: Use is_bootstrapping everywhere (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698