| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 5218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5229 " while ( flag == true ) {\n" | 5229 " while ( flag == true ) {\n" |
| 5230 " if ( x == 1 ) {\n" | 5230 " if ( x == 1 ) {\n" |
| 5231 " ThreadedAtBarrier1();\n" | 5231 " ThreadedAtBarrier1();\n" |
| 5232 " }\n" | 5232 " }\n" |
| 5233 " x = x + 1;\n" | 5233 " x = x + 1;\n" |
| 5234 " }\n" | 5234 " }\n" |
| 5235 "}\n" | 5235 "}\n" |
| 5236 "\n" | 5236 "\n" |
| 5237 "foo();\n"; | 5237 "foo();\n"; |
| 5238 | 5238 |
| 5239 isolate_ = v8::Isolate::New(); | 5239 v8::Isolate::CreateParams create_params; |
| 5240 create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); |
| 5241 isolate_ = v8::Isolate::New(create_params); |
| 5240 threaded_debugging_barriers.barrier_3.Wait(); | 5242 threaded_debugging_barriers.barrier_3.Wait(); |
| 5241 { | 5243 { |
| 5242 v8::Isolate::Scope isolate_scope(isolate_); | 5244 v8::Isolate::Scope isolate_scope(isolate_); |
| 5243 DebugLocalContext env(isolate_); | 5245 DebugLocalContext env(isolate_); |
| 5244 v8::HandleScope scope(isolate_); | 5246 v8::HandleScope scope(isolate_); |
| 5245 v8::Debug::SetMessageHandler(&ThreadedMessageHandler); | 5247 v8::Debug::SetMessageHandler(&ThreadedMessageHandler); |
| 5246 v8::Handle<v8::ObjectTemplate> global_template = | 5248 v8::Handle<v8::ObjectTemplate> global_template = |
| 5247 v8::ObjectTemplate::New(env->GetIsolate()); | 5249 v8::ObjectTemplate::New(env->GetIsolate()); |
| 5248 global_template->Set( | 5250 global_template->Set( |
| 5249 v8::String::NewFromUtf8(env->GetIsolate(), "ThreadedAtBarrier1"), | 5251 v8::String::NewFromUtf8(env->GetIsolate(), "ThreadedAtBarrier1"), |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5360 " var x = 1;\n" | 5362 " var x = 1;\n" |
| 5361 " x = y_global;" | 5363 " x = y_global;" |
| 5362 " var z = 3;" | 5364 " var z = 3;" |
| 5363 " x += 100;\n" | 5365 " x += 100;\n" |
| 5364 " return x;\n" | 5366 " return x;\n" |
| 5365 "}\n" | 5367 "}\n" |
| 5366 "\n"; | 5368 "\n"; |
| 5367 const char* source_2 = "cat(17);\n" | 5369 const char* source_2 = "cat(17);\n" |
| 5368 "cat(19);\n"; | 5370 "cat(19);\n"; |
| 5369 | 5371 |
| 5370 isolate_ = v8::Isolate::New(); | 5372 v8::Isolate::CreateParams create_params; |
| 5373 create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); |
| 5374 isolate_ = v8::Isolate::New(create_params); |
| 5371 breakpoints_barriers->barrier_3.Wait(); | 5375 breakpoints_barriers->barrier_3.Wait(); |
| 5372 { | 5376 { |
| 5373 v8::Isolate::Scope isolate_scope(isolate_); | 5377 v8::Isolate::Scope isolate_scope(isolate_); |
| 5374 DebugLocalContext env(isolate_); | 5378 DebugLocalContext env(isolate_); |
| 5375 v8::HandleScope scope(isolate_); | 5379 v8::HandleScope scope(isolate_); |
| 5376 v8::Debug::SetMessageHandler(&BreakpointsMessageHandler); | 5380 v8::Debug::SetMessageHandler(&BreakpointsMessageHandler); |
| 5377 | 5381 |
| 5378 CompileRun(source_1); | 5382 CompileRun(source_1); |
| 5379 breakpoints_barriers->barrier_1.Wait(); | 5383 breakpoints_barriers->barrier_1.Wait(); |
| 5380 breakpoints_barriers->barrier_2.Wait(); | 5384 breakpoints_barriers->barrier_2.Wait(); |
| (...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7589 "let y = 2; \n" | 7593 "let y = 2; \n" |
| 7590 "debugger; \n" | 7594 "debugger; \n" |
| 7591 "x * y", | 7595 "x * y", |
| 7592 30); | 7596 30); |
| 7593 ExpectInt32( | 7597 ExpectInt32( |
| 7594 "x = 1; y = 2; \n" | 7598 "x = 1; y = 2; \n" |
| 7595 "debugger;" | 7599 "debugger;" |
| 7596 "x * y", | 7600 "x * y", |
| 7597 30); | 7601 30); |
| 7598 } | 7602 } |
| OLD | NEW |