| Index: test/cctest/test-debug.cc
|
| diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
|
| index eb9789ab36d211c27c051fff6c46bb1de2f4be00..3cb840049a776b1b8e1ecc53fc3cf0084bcb9c19 100644
|
| --- a/test/cctest/test-debug.cc
|
| +++ b/test/cctest/test-debug.cc
|
| @@ -70,65 +70,6 @@ using ::v8::internal::StrLength;
|
| // Size of temp buffer for formatting small strings.
|
| #define SMALL_STRING_BUFFER_SIZE 80
|
|
|
| -// --- A d d i t i o n a l C h e c k H e l p e r s
|
| -
|
| -
|
| -// Helper function used by the CHECK_EQ function when given Address
|
| -// arguments. Should not be called directly.
|
| -static inline void CheckEqualsHelper(const char* file, int line,
|
| - const char* expected_source,
|
| - ::v8::internal::Address expected,
|
| - const char* value_source,
|
| - ::v8::internal::Address value) {
|
| - if (expected != value) {
|
| - V8_Fatal(file, line, "CHECK_EQ(%s, %s) failed\n# "
|
| - "Expected: %i\n# Found: %i",
|
| - expected_source, value_source, expected, value);
|
| - }
|
| -}
|
| -
|
| -
|
| -// Helper function used by the CHECK_NE function when given Address
|
| -// arguments. Should not be called directly.
|
| -static inline void CheckNonEqualsHelper(const char* file, int line,
|
| - const char* unexpected_source,
|
| - ::v8::internal::Address unexpected,
|
| - const char* value_source,
|
| - ::v8::internal::Address value) {
|
| - if (unexpected == value) {
|
| - V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %i",
|
| - unexpected_source, value_source, value);
|
| - }
|
| -}
|
| -
|
| -
|
| -// Helper function used by the CHECK function when given code
|
| -// arguments. Should not be called directly.
|
| -static inline void CheckEqualsHelper(const char* file, int line,
|
| - const char* expected_source,
|
| - const Code* expected,
|
| - const char* value_source,
|
| - const Code* value) {
|
| - if (expected != value) {
|
| - V8_Fatal(file, line, "CHECK_EQ(%s, %s) failed\n# "
|
| - "Expected: %p\n# Found: %p",
|
| - expected_source, value_source, expected, value);
|
| - }
|
| -}
|
| -
|
| -
|
| -static inline void CheckNonEqualsHelper(const char* file, int line,
|
| - const char* expected_source,
|
| - const Code* expected,
|
| - const char* value_source,
|
| - const Code* value) {
|
| - if (expected == value) {
|
| - V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %p",
|
| - expected_source, value_source, value);
|
| - }
|
| -}
|
| -
|
| -
|
| // --- H e l p e r C l a s s e s
|
|
|
|
|
| @@ -2922,7 +2863,7 @@ TEST(DebugStepKeyedLoadLoop) {
|
| "foo");
|
|
|
| // Create array [0,1,2,3,4,5,6,7,8,9]
|
| - v8::Local<v8::Array> a = v8::Array::New(10);
|
| + v8::Local<v8::Array> a = v8::Array::New(env->GetIsolate(), 10);
|
| for (int i = 0; i < 10; i++) {
|
| a->Set(v8::Number::New(i), v8::Number::New(i));
|
| }
|
| @@ -2969,7 +2910,7 @@ TEST(DebugStepKeyedStoreLoop) {
|
| "foo");
|
|
|
| // Create array [0,1,2,3,4,5,6,7,8,9]
|
| - v8::Local<v8::Array> a = v8::Array::New(10);
|
| + v8::Local<v8::Array> a = v8::Array::New(env->GetIsolate(), 10);
|
| for (int i = 0; i < 10; i++) {
|
| a->Set(v8::Number::New(i), v8::Number::New(i));
|
| }
|
| @@ -3943,8 +3884,6 @@ TEST(BreakOnException) {
|
| v8::HandleScope scope(env->GetIsolate());
|
| env.ExposeDebug();
|
|
|
| - CcTest::i_isolate()->TraceException(false);
|
| -
|
| // Create functions for testing break on exception.
|
| CompileFunction(&env, "function throws(){throw 1;}", "throws");
|
| v8::Local<v8::Function> caught =
|
| @@ -4089,8 +4028,6 @@ TEST(BreakOnCompileException) {
|
| // For this test, we want to break on uncaught exceptions:
|
| ChangeBreakOnException(false, true);
|
|
|
| - CcTest::i_isolate()->TraceException(false);
|
| -
|
| // Create a function for checking the function when hitting a break point.
|
| frame_count = CompileFunction(&env, frame_count_source, "frame_count");
|
|
|
| @@ -4356,7 +4293,7 @@ TEST(NoBreakWhenBootstrapping) {
|
|
|
|
|
| static void NamedEnum(const v8::PropertyCallbackInfo<v8::Array>& info) {
|
| - v8::Handle<v8::Array> result = v8::Array::New(3);
|
| + v8::Handle<v8::Array> result = v8::Array::New(info.GetIsolate(), 3);
|
| result->Set(v8::Integer::New(0),
|
| v8::String::NewFromUtf8(info.GetIsolate(), "a"));
|
| result->Set(v8::Integer::New(1),
|
| @@ -4368,7 +4305,7 @@ static void NamedEnum(const v8::PropertyCallbackInfo<v8::Array>& info) {
|
|
|
|
|
| static void IndexedEnum(const v8::PropertyCallbackInfo<v8::Array>& info) {
|
| - v8::Handle<v8::Array> result = v8::Array::New(2);
|
| + v8::Handle<v8::Array> result = v8::Array::New(info.GetIsolate(), 2);
|
| result->Set(v8::Integer::New(0), v8::Number::New(1));
|
| result->Set(v8::Integer::New(1), v8::Number::New(10));
|
| info.GetReturnValue().Set(result);
|
| @@ -6127,7 +6064,7 @@ class DebuggerAgentProtocolServerThread : public i::Thread {
|
|
|
| void Run();
|
| void WaitForListening() { listening_.Wait(); }
|
| - char* body() { return *body_; }
|
| + char* body() { return body_.get(); }
|
|
|
| private:
|
| int port_;
|
| @@ -6251,7 +6188,8 @@ TEST(DebugGetLoadedScripts) {
|
| env.ExposeDebug();
|
|
|
| EmptyExternalStringResource source_ext_str;
|
| - v8::Local<v8::String> source = v8::String::NewExternal(&source_ext_str);
|
| + v8::Local<v8::String> source =
|
| + v8::String::NewExternal(env->GetIsolate(), &source_ext_str);
|
| v8::Handle<v8::Script> evil_script(v8::Script::Compile(source));
|
| // "use" evil_script to make the compiler happy.
|
| (void) evil_script;
|
| @@ -7514,9 +7452,9 @@ static void TestDebugBreakInLoop(const char* loop_head,
|
| for (int i = 0; loop_bodies[i] != NULL; i++) {
|
| // Perform a lazy deoptimization after various numbers of breaks
|
| // have been hit.
|
| - for (int j = 0; j < 11; j++) {
|
| + for (int j = 0; j < 7; j++) {
|
| break_point_hit_count_deoptimize = j;
|
| - if (j == 10) {
|
| + if (j == 6) {
|
| break_point_hit_count_deoptimize = kBreaksPerTest;
|
| }
|
|
|
| @@ -7731,7 +7669,7 @@ TEST(LiveEditDisabled) {
|
| v8::internal::FLAG_allow_natives_syntax = true;
|
| LocalContext env;
|
| v8::HandleScope scope(env->GetIsolate());
|
| - v8::Debug::SetLiveEditEnabled(false), env->GetIsolate();
|
| + v8::Debug::SetLiveEditEnabled(false, env->GetIsolate());
|
| CompileRun("%LiveEditCompareStrings('', '')");
|
| }
|
|
|
|
|