DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
"function foo(){bar=0;}"))->Run();
v8::Local<v8::Function> foo = v8::Local<v8::Function>::Cast(
foo->Call(env->Global(), 0, NULL);
CHECK_EQ(2, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
break_point_hit_count = 0;
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(), "bar=1"))
->Run();
v8::Script::Compile(
foo->Call(env->Global(), 0, NULL);
CHECK_EQ(2, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
break_point_hit_count = 0;
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function bar(){}"))->Run();
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
foo->Call(env->Global(), 0, NULL);
CHECK_EQ(2, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
break_point_hit_count = 0;
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointCollectGarbage);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointCollectGarbage);
v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function bar(){return 1;}"))
->Run();
foo->Call(env->Global(), 0, NULL);
CHECK_EQ(2, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
break_point_hit_count = 0;
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointCollectGarbage);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointCollectGarbage);
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
"function bar(){ this.x = 1;}"))
->Run();
foo->Call(env->Global(), 0, NULL);
CHECK_EQ(2, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
"frame_source_column");
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function foo(){}"))->Run();
v8::Local<v8::Function> foo = v8::Local<v8::Function>::Cast(
foo->Call(env->Global(), 0, NULL);
CHECK_EQ(2, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointCollectGarbage);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointCollectGarbage);
v8::Local<v8::Function> foo;
// Test IC store break point with garbage collection.
SetBreakPoint(foo, 0);
CallWithBreakPoints(env->Global(), foo, 1, 25);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::Function> foo;
// Test IC store break point with garbage collection.
CallAndGC(env->Global(), foo);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function bar(){}"))->Run();
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
foo->Run();
CHECK_EQ(8, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
// Make sure that the break point numbers are consecutive.
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::String> script = v8::String::NewFromUtf8(
env->GetIsolate(),
g->Call(env->Global(), 0, NULL);
CHECK_EQ(0, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
// Make sure that the break point numbers are consecutive.
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::String> source = v8::String::NewFromUtf8(
env->GetIsolate(),
g->Call(env->Global(), 0, NULL);
CHECK_EQ(0, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
// Make sure that the break point numbers are consecutive.
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::String> script = v8::String::NewFromUtf8(
env->GetIsolate(),
f->Call(env->Global(), 0, NULL);
CHECK_EQ(3, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::String> script = v8::String::NewFromUtf8(
env->GetIsolate(),
}
CHECK_EQ(5, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::String> script = v8::String::NewFromUtf8(
env->GetIsolate(),
}
CHECK_EQ(5, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::Function> f;
v8::Local<v8::String> script = v8::String::NewFromUtf8(
f->Call(env->Global(), 0, NULL);
CHECK_EQ(1, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::Function> f;
v8::Local<v8::String> script_f =
g->Call(env->Global(), 0, NULL);
CHECK_EQ(2, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::Function> f;
v8::Local<v8::String> script = v8::String::NewFromUtf8(
f->Call(env->Global(), 0, NULL);
CHECK_EQ(1, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
frame_function_name_source,
"frame_function_name");
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::Function> f;
v8::Local<v8::Function> g;
v8::Script::Compile(script, &origin)->Run();
CHECK_EQ(0, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::String> script =
v8::String::NewFromUtf8(env->GetIsolate(),
env->Global()->Get(v8::String::NewFromUtf8(env->GetIsolate(), "f")));
CHECK_EQ(0, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Local<v8::String> script_source =
v8::String::NewFromUtf8(env->GetIsolate(),
ClearBreakPointFromJS(env->GetIsolate(), sbp1);
ClearBreakPointFromJS(env->GetIsolate(), sbp2);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
debug_event_remove_break_point = SetBreakPoint(foo, 0);
// Register the debug event listener pasing the function
- v8::Debug::SetDebugEventListener2(DebugEventRemoveBreakPoint, foo);
+ v8::Debug::SetDebugEventListener(DebugEventRemoveBreakPoint, foo);
break_point_hit_count = 0;
foo->Call(env->Global(), 0, NULL);
foo->Call(env->Global(), 0, NULL);
CHECK_EQ(0, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
break_point_hit_count = 0;
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function bar(){debugger}"))
->Run();
foo->Call(env->Global(), 0, NULL);
CHECK_EQ(3, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
break_point_hit_count = 0;
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function foo(){debugger;}"))
->Run();
CHECK_EQ(2, break_point_hit_count);
ClearBreakPoint(bp);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
evaluate_check_source,
"evaluate_check");
// Register the debug event listener
- v8::Debug::SetDebugEventListener2(DebugEventEvaluate);
+ v8::Debug::SetDebugEventListener(DebugEventEvaluate);
// Different expected vaules of x and a when in a break point (u = undefined,
// d = Hello, world!).
};
bar->Call(env->Global(), 2, argv_bar_3);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(CheckDebugEvent);
+ v8::Debug::SetDebugEventListener(CheckDebugEvent);
v8::Local<v8::Function> foo = CompileFunction(&env,
"function foo(x) {\n"
foo->Call(env->Global(), 0, NULL);
CHECK_EQ(1, debugEventCount);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(CheckDebugEval);
+ v8::Debug::SetDebugEventListener(CheckDebugEval);
v8::Local<v8::Function> foo = CompileFunction(&env,
"var global = 'Global';\n"
checkGlobalEvalFunction.Clear();
checkFrameEvalFunction.Clear();
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
// Test that the evaluation of expressions works even from ProcessDebugMessages
// i.e. with empty stack.
TEST(DebugEvaluateWithoutStack) {
- v8::Debug::SetMessageHandler2(DebugProcessDebugMessagesHandler);
+ v8::Debug::SetMessageHandler(DebugProcessDebugMessagesHandler);
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
0);
CHECK_EQ(strcmp("805", process_debug_messages_data.results[2].buffer), 0);
- v8::Debug::SetMessageHandler2(NULL);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
SetBreakPoint(foo, 3);
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
step_action = StepIn;
break_point_hit_count = 0;
// With stepping all break locations are hit.
CHECK_EQ(4, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
// Register a debug event listener which just counts.
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
SetBreakPoint(foo, 3);
break_point_hit_count = 0;
// Without stepping only active break points are hit.
CHECK_EQ(1, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping of keyed load. The statement 'y=1'
// is there to have more than one breakable statement in the loop, TODO(315).
// With stepping all break locations are hit.
CHECK_EQ(35, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping of keyed store. The statement 'y=1'
// is there to have more than one breakable statement in the loop, TODO(315).
// With stepping all break locations are hit.
CHECK_EQ(34, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping of named load.
v8::Local<v8::Function> foo = CompileFunction(
// With stepping all break locations are hit.
CHECK_EQ(55, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping of named store.
v8::Local<v8::Function> foo = CompileFunction(
// With stepping all expected break locations are hit.
CHECK_EQ(expected, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping.
v8::Local<v8::Function> foo = CompileFunction(&env,
// With stepping all break locations are hit.
CHECK_EQ(11, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
// Register a debug event listener which just counts.
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
SetBreakPoint(foo, 0);
break_point_hit_count = 0;
// Without stepping only active break points are hit.
CHECK_EQ(1, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(6, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(6, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(isolate);
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(5, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(isolate);
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(7, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(isolate);
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(202, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(isolate);
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(202, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(isolate);
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(203, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(isolate);
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(457, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(isolate);
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(505, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(8, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(4, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(isolate);
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
CHECK_EQ(5, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
"frame_function_name");
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStepSequence);
+ v8::Debug::SetDebugEventListener(DebugEventStepSequence);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
"frame_function_name");
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStepSequence);
+ v8::Debug::SetDebugEventListener(DebugEventStepSequence);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded(true);
}
"frame_function_name");
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStepSequence);
+ v8::Debug::SetDebugEventListener(DebugEventStepSequence);
// Create a function for testing stepping. Run it to allow it to get
// optimized.
break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
"foo");
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
step_action = StepIn;
break_point_hit_count = 0;
// With stepping all break locations are hit.
CHECK_EQ(3, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
// Register a debug event listener which just counts.
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
break_point_hit_count = 0;
foo->Call(env->Global(), 0, NULL);
// Without stepping only active break points are hit.
CHECK_EQ(1, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
"foo");
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
step_action = StepIn;
break_point_hit_count = 0;
// With stepping all break locations are hit.
CHECK_EQ(7, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
// Register a debug event listener which just counts.
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
break_point_hit_count = 0;
foo->Call(env->Global(), 0, NULL);
// Without stepping only the debugger statement is hit.
CHECK_EQ(1, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
"foo");
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStep);
+ v8::Debug::SetDebugEventListener(DebugEventStep);
step_action = StepIn;
// Check stepping where the if condition in bar is false.
foo->Call(env->Global(), argc, argv);
CHECK_EQ(8, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
// Register a debug event listener which just counts.
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
break_point_hit_count = 0;
foo->Call(env->Global(), 0, NULL);
// Without stepping only the debugger statement is hit.
CHECK_EQ(1, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
env.ExposeDebug();
// Register a debug event listener which counts.
- v8::Debug::SetDebugEventListener2(DebugEventCounter);
+ v8::Debug::SetDebugEventListener(DebugEventCounter);
// Create a script that returns a function.
const char* src = "(function (evt) {})";
CHECK_EQ(1, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
CompileFunction(&env, "function notCaught(){throws();}", "notCaught");
v8::V8::AddMessageListener(MessageCallbackCount);
- v8::Debug::SetDebugEventListener2(DebugEventCounter);
+ v8::Debug::SetDebugEventListener(DebugEventCounter);
// Initial state should be no break on exceptions.
DebugEventCounterClear();
CHECK_EQ(1, uncaught_exception_hit_count);
CHECK_EQ(1, message_callback_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
v8::V8::RemoveMessageListeners(MessageCallbackCount);
}
frame_count = CompileFunction(&env, frame_count_source, "frame_count");
v8::V8::AddMessageListener(MessageCallbackCount);
- v8::Debug::SetDebugEventListener2(DebugEventCounter);
+ v8::Debug::SetDebugEventListener(DebugEventCounter);
DebugEventCounterClear();
MessageCallbackCountClear();
"frame_function_name");
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventStepSequence);
+ v8::Debug::SetDebugEventListener(DebugEventStepSequence);
// Create functions for testing stepping.
const char* src = "function a() { n(); }; "
break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(isolate);
// Register a debug event listener which sets the break flag and counts.
- v8::Debug::SetDebugEventListener2(DebugEventBreak);
+ v8::Debug::SetDebugEventListener(DebugEventBreak);
// Create a function for testing stepping.
const char* src = "function f0() {}"
CHECK_EQ(4 * ARRAY_SIZE(argv), break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which sets the break flag and counts.
- v8::Debug::SetDebugEventListener2(DebugEventCounter);
+ v8::Debug::SetDebugEventListener(DebugEventCounter);
// Create a function for testing stepping.
const char* src = "function f() {g()};function g(){i=0; while(i<10){i++}}";
CHECK_EQ(2, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
v8::HandleScope scope(isolate);
// Register a debug event listener which sets the break flag and counts.
- v8::Debug::SetDebugEventListener2(DebugEventCounter);
+ v8::Debug::SetDebugEventListener(DebugEventCounter);
// Set the debug break flag.
v8::Debug::DebugBreak(isolate);
CHECK_EQ(0, break_point_hit_count);
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
// Create a V8 environment
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetMessageHandler2(MessageHandler);
+ v8::Debug::SetMessageHandler(MessageHandler);
message_queue_debugger_thread.Start();
const char* source_1 = "a = 3; b = 4; c = new Object(); c.d = 5;";
v8::HandleScope scope(isolate);
TestClientData::ResetCounters();
handled_client_data_instances_count = 0;
- v8::Debug::SetMessageHandler2(MessageHandlerCountingClientData);
+ v8::Debug::SetMessageHandler(MessageHandlerCountingClientData);
const char* source_1 = "a = 3; b = 4; c = new Object(); c.d = 5;";
const int kBufferSize = 1000;
uint16_t buffer[kBufferSize];
v8::Isolate::Scope isolate_scope(isolate);
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetMessageHandler2(&ThreadedMessageHandler);
+ v8::Debug::SetMessageHandler(&ThreadedMessageHandler);
v8::Handle<v8::ObjectTemplate> global_template =
v8::ObjectTemplate::New(env->GetIsolate());
global_template->Set(
v8::Isolate::Scope isolate_scope(isolate);
DebugLocalContext env;
v8::HandleScope scope(isolate);
- v8::Debug::SetMessageHandler2(&BreakpointsMessageHandler);
+ v8::Debug::SetMessageHandler(&BreakpointsMessageHandler);
CompileRun(source_1);
breakpoints_barriers->barrier_1.Wait();
TEST(SetDebugEventListenerOnUninitializedVM) {
- v8::Debug::SetDebugEventListener2(DummyDebugEventListener);
+ v8::Debug::SetDebugEventListener(DummyDebugEventListener);
}
TEST(SetMessageHandlerOnUninitializedVM) {
- v8::Debug::SetMessageHandler2(DummyMessageHandler);
+ v8::Debug::SetMessageHandler(DummyMessageHandler);
}
// Set a debug event listener.
break_point_hit_count = 0;
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
{
v8::HandleScope scope(env->GetIsolate());
// Create a couple of functions for the test.
// Remove the debug event listener without clearing breakpoints. Do this
// outside a handle scope.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded(true);
// Now set a debug message handler.
break_point_hit_count = 0;
- v8::Debug::SetMessageHandler2(MessageHandlerBreakPointHitCount);
+ v8::Debug::SetMessageHandler(MessageHandlerBreakPointHitCount);
{
v8::HandleScope scope(env->GetIsolate());
// Remove the debug message handler without clearing breakpoints. Do this
// outside a handle scope.
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
CheckDebuggerUnloaded(true);
}
CheckDebuggerUnloaded();
// Set a debug message handler.
- v8::Debug::SetMessageHandler2(MessageHandlerHitCount);
+ v8::Debug::SetMessageHandler(MessageHandlerHitCount);
// Run code to throw a unhandled exception. This should end up in the message
// handler.
// Clear debug message handler.
message_handler_hit_count = 0;
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
// Run code to throw a unhandled exception. This should end up in the message
// handler.
message_handler_hit_count++;
// Clear debug message handler.
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
}
CheckDebuggerUnloaded();
// Set a debug message handler.
- v8::Debug::SetMessageHandler2(MessageHandlerClearingMessageHandler);
+ v8::Debug::SetMessageHandler(MessageHandlerClearingMessageHandler);
// Run code to throw a unhandled exception. This should end up in the message
// handler.
frame_script_name_source,
"frame_script_name");
- v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
// Test function source.
v8::Local<v8::String> script = v8::String::NewFromUtf8(env->GetIsolate(),
context_1 = v8::Context::New(isolate, NULL, global_template, global_object);
context_2 = v8::Context::New(isolate, NULL, global_template, global_object);
- v8::Debug::SetMessageHandler2(ContextCheckMessageHandler);
+ v8::Debug::SetMessageHandler(ContextCheckMessageHandler);
// Default data value is undefined.
CHECK(context_1->GetEmbedderData(0)->IsUndefined());
// Two times compile event and two times break event.
CHECK_GT(message_handler_hit_count, 4);
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
CheckDebuggerUnloaded();
}
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetMessageHandler2(DebugBreakMessageHandler);
+ v8::Debug::SetMessageHandler(DebugBreakMessageHandler);
// Test functions.
const char* script = "function f() { debugger; g(); } function g() { }";
v8::Local<v8::Value> result = f->Call(env->Global(), argc, argv);
CHECK_EQ(12, result->Int32Value());
- v8::Debug::SetDebugEventListener2(DebugEventDebugBreak);
+ v8::Debug::SetDebugEventListener(DebugEventDebugBreak);
v8::Debug::DebugBreak(env->GetIsolate());
result = f->Call(env->Global(), argc, argv);
// Common part of EvalContextData and NestedBreakEventContextData tests.
static void ExecuteScriptForContextCheck(
- v8::Debug::MessageHandler2 message_handler) {
+ v8::Debug::MessageHandler message_handler) {
// Create a context.
v8::Handle<v8::Context> context_1;
v8::Handle<v8::ObjectTemplate> global_template =
context_1 =
v8::Context::New(CcTest::isolate(), NULL, global_template);
- v8::Debug::SetMessageHandler2(message_handler);
+ v8::Debug::SetMessageHandler(message_handler);
// Default data value is undefined.
CHECK(context_1->GetEmbedderData(0)->IsUndefined());
f->Call(context_1->Global(), 0, NULL);
}
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
}
CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
script_collected_count = 0;
- v8::Debug::SetDebugEventListener2(DebugEventScriptCollectedEvent);
+ v8::Debug::SetDebugEventListener(DebugEventScriptCollectedEvent);
{
v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "eval('a=1')"))->Run();
CHECK_EQ(2, script_collected_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
// collected afterwards.
CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
- v8::Debug::SetMessageHandler2(ScriptCollectedMessageHandler);
+ v8::Debug::SetMessageHandler(ScriptCollectedMessageHandler);
v8::Script::Compile(v8::String::NewFromUtf8(isolate, "eval('a=1')"))->Run();
v8::Script::Compile(v8::String::NewFromUtf8(isolate, "eval('a=2')"))->Run();
CHECK_EQ(2, script_collected_message_count);
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
}
after_compile_message_count = 0;
const char* script = "var a=1";
- v8::Debug::SetMessageHandler2(AfterCompileMessageHandler);
+ v8::Debug::SetMessageHandler(AfterCompileMessageHandler);
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(), script))
->Run();
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
- v8::Debug::SetMessageHandler2(AfterCompileMessageHandler);
+ v8::Debug::SetMessageHandler(AfterCompileMessageHandler);
v8::Debug::DebugBreak(env->GetIsolate());
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(), script))
->Run();
// Setting listener to NULL should cause debugger unload.
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
CheckDebuggerUnloaded();
// Compilation cache should be disabled when debugger is active.
after_compile_message_count = 0;
const char* script = "function f() {};";
- v8::Debug::SetMessageHandler2(AfterCompileMessageHandler);
+ v8::Debug::SetMessageHandler(AfterCompileMessageHandler);
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(), script))
->Run();
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
- v8::Debug::SetMessageHandler2(AfterCompileMessageHandler);
+ v8::Debug::SetMessageHandler(AfterCompileMessageHandler);
v8::Debug::DebugBreak(env->GetIsolate());
v8::Local<v8::Function> f = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::NewFromUtf8(env->GetIsolate(), "f")));
f->Call(env->Global(), 0, NULL);
// Setting message handler to NULL should cause debugger unload.
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
CheckDebuggerUnloaded();
// Compilation cache should be disabled when debugger is active.
exception_event_count = 0;
const char* script = "function f() {throw new Error()};";
- v8::Debug::SetMessageHandler2(AfterCompileMessageHandler);
+ v8::Debug::SetMessageHandler(AfterCompileMessageHandler);
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(), script))
->Run();
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
- v8::Debug::SetMessageHandler2(ExceptionMessageHandler);
+ v8::Debug::SetMessageHandler(ExceptionMessageHandler);
v8::Local<v8::Function> f = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::NewFromUtf8(env->GetIsolate(), "f")));
f->Call(env->Global(), 0, NULL);
// Setting message handler to NULL should cause debugger unload.
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
CheckDebuggerUnloaded();
CHECK_EQ(1, exception_event_count);
SetScriptBreakPointByNameFromJS(env->GetIsolate(), resource_name, 5, 5);
after_compile_message_count = 0;
- v8::Debug::SetMessageHandler2(AfterCompileMessageHandler);
+ v8::Debug::SetMessageHandler(AfterCompileMessageHandler);
v8::ScriptOrigin origin(
v8::String::NewFromUtf8(env->GetIsolate(), resource_name),
ClearBreakPointFromJS(env->GetIsolate(), sbp1);
ClearBreakPointFromJS(env->GetIsolate(), sbp2);
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which sets the break flag and counts.
- v8::Debug::SetMessageHandler2(BreakMessageHandler);
+ v8::Debug::SetMessageHandler(BreakMessageHandler);
// Set the debug break flag.
v8::Debug::DebugBreak(env->GetIsolate());
CHECK_EQ(2, break_point_hit_count);
// Get rid of the debug message handler.
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
CheckDebuggerUnloaded();
}
counting_message_handler_counter = 0;
- v8::Debug::SetMessageHandler2(CountingMessageHandler);
+ v8::Debug::SetMessageHandler(CountingMessageHandler);
const int kBufferSize = 1000;
uint16_t buffer[kBufferSize];
CHECK_GE(counting_message_handler_counter, 2);
// Get rid of the debug message handler.
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
CheckDebuggerUnloaded();
}
v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate);
- v8::Debug::SetMessageHandler2(BacktraceData::MessageHandler);
+ v8::Debug::SetMessageHandler(BacktraceData::MessageHandler);
const int kBufferSize = 1000;
uint16_t buffer[kBufferSize];
CHECK_EQ(BacktraceData::frame_counter, 1);
// Get rid of the debug message handler.
- v8::Debug::SetMessageHandler2(NULL);
+ v8::Debug::SetMessageHandler(NULL);
CheckDebuggerUnloaded();
}
"foo");
// Register a debug event listener which steps and counts.
- v8::Debug::SetDebugEventListener2(DebugEventBreakMax);
+ v8::Debug::SetDebugEventListener(DebugEventBreakMax);
// Set the debug break flag before calling the code using function.apply.
v8::Debug::DebugBreak(env->GetIsolate());
// When keeping the debug break several break will happen.
CHECK_GT(break_point_hit_count, 1);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
named->NewInstance());
// Register the debug event listener
- v8::Debug::SetDebugEventListener2(DebugEventGetAtgumentPropertyValue);
+ v8::Debug::SetDebugEventListener(DebugEventGetAtgumentPropertyValue);
// Create a function that invokes debugger.
v8::Local<v8::Function> foo = CompileFunction(
foo->Call(env->Global(), 0, NULL);
CHECK_EQ(1, break_point_hit_count);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
debugee_context = v8::Handle<v8::Context>();
debugger_context = v8::Handle<v8::Context>();
CheckDebuggerUnloaded();
v8::HandleScope scope(isolate);
expected_context = v8::Context::New(isolate);
expected_callback_data = v8::Int32::New(isolate, 2010);
- v8::Debug::SetDebugEventListener2(DebugEventContextChecker,
+ v8::Debug::SetDebugEventListener(DebugEventContextChecker,
expected_callback_data);
v8::Context::Scope context_scope(expected_context);
v8::Script::Compile(
v8::String::NewFromUtf8(isolate, "(function(){debugger;})();"))->Run();
expected_context.Clear();
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
expected_context_data = v8::Handle<v8::Value>();
CheckDebuggerUnloaded();
}
DebugLocalContext env;
v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate);
- v8::Debug::SetDebugEventListener2(DebugEventBreakDataChecker);
+ v8::Debug::SetDebugEventListener(DebugEventBreakDataChecker);
TestClientData::constructor_call_counter = 0;
TestClientData::destructor_call_counter = 0;
CHECK_EQ(TestClientData::constructor_call_counter,
TestClientData::destructor_call_counter);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
// This tests lazy deoptimization bailout for the stack check, as the first
// time in function bar when using debug break and no break points will be at
// the initial stack check.
- v8::Debug::SetDebugEventListener2(DebugEventBreakDeoptimize);
+ v8::Debug::SetDebugEventListener(DebugEventBreakDeoptimize);
// Compile and run function bar which will optimize it for some flag settings.
v8::Script::Compile(v8::String::NewFromUtf8(
CHECK(debug_event_break_deoptimize_done);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
}
static void ScheduleBreak(const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::Debug::SetDebugEventListener2(DebugEventBreakWithOptimizedStack);
+ v8::Debug::SetDebugEventListener(DebugEventBreakWithOptimizedStack);
v8::Debug::DebugBreak(args.GetIsolate());
}
v8::HandleScope scope(env->GetIsolate());
// Register a debug event listener which sets the break flag and counts.
- v8::Debug::SetDebugEventListener2(DebugEventBreakMax);
+ v8::Debug::SetDebugEventListener(DebugEventBreakMax);
// Create a function for getting the frame count when hitting the break.
frame_count = CompileFunction(&env, frame_count_source, "frame_count");
TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}");
// Get rid of the debug event listener.
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
CHECK_EQ(expected_line_number[i],
i::Script::GetLineNumber(source_script, result->Int32Value()));
}
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
v8::V8::TerminateExecution(CcTest::isolate());
}
"g(false); \n"
"%OptimizeFunctionOnNextCall(g); \n"
"g(true);";
- v8::Debug::SetDebugEventListener2(DebugBreakInlineListener);
+ v8::Debug::SetDebugEventListener(DebugBreakInlineListener);
inline_script =
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(), source));
inline_script->Run();
// on the stack.
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugEventStepNext);
+ v8::Debug::SetDebugEventListener(DebugEventStepNext);
// We step through the first script. It exits through an exception. We run
// this inside a new frame to record a different FP than the second script
const char* script_2 = "[0].forEach(function() { });";
CompileRun(script_2);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
}
v8::HandleScope scope(env->GetIsolate());
CHECK_EQ(1, CountNativeContexts());
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CompileRun("debugger;");
CHECK_EQ(1, CountNativeContexts());
- v8::Debug::SetDebugEventListener2(NopListener);
+ v8::Debug::SetDebugEventListener(NopListener);
CompileRun("debugger;");
CHECK_EQ(2, CountNativeContexts());
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
}
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
env.ExposeDebug();
- v8::Debug::SetDebugEventListener2(DebugBreakInlineListener);
+ v8::Debug::SetDebugEventListener(DebugBreakInlineListener);
v8::Local<v8::Function> break_here =
CompileFunction(&env, "function break_here(){}", "break_here");
v8::String::Utf8Value utf8(result);
CHECK_EQ("bar", *utf8);
- v8::Debug::SetDebugEventListener2(NULL);
+ v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
}
TEST(DebugBreakStackTrace) {
DebugLocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Debug::SetDebugEventListener2(DebugBreakStackTraceListener);
+ v8::Debug::SetDebugEventListener(DebugBreakStackTraceListener);
v8::Handle<v8::FunctionTemplate> add_debug_break_template =
v8::FunctionTemplate::New(env->GetIsolate(), AddDebugBreak);
v8::Handle<v8::Function> add_debug_break =