OLD | NEW |
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 364 |
365 | 365 |
366 // Prepare to step to next break location. | 366 // Prepare to step to next break location. |
367 static void PrepareStep(StepAction step_action) { | 367 static void PrepareStep(StepAction step_action) { |
368 Debug::PrepareStep(step_action, 1); | 368 Debug::PrepareStep(step_action, 1); |
369 } | 369 } |
370 | 370 |
371 | 371 |
372 // This function is in namespace v8::internal to be friend with class | 372 // This function is in namespace v8::internal to be friend with class |
373 // v8::internal::Debug. | 373 // v8::internal::Debug. |
374 namespace v8 { namespace internal { // NOLINT | 374 namespace v8 { |
| 375 namespace internal { |
375 | 376 |
376 // Collect the currently debugged functions. | 377 // Collect the currently debugged functions. |
377 Handle<FixedArray> GetDebuggedFunctions() { | 378 Handle<FixedArray> GetDebuggedFunctions() { |
378 v8::internal::DebugInfoListNode* node = Debug::debug_info_list_; | 379 v8::internal::DebugInfoListNode* node = Debug::debug_info_list_; |
379 | 380 |
380 // Find the number of debugged functions. | 381 // Find the number of debugged functions. |
381 int count = 0; | 382 int count = 0; |
382 while (node) { | 383 while (node) { |
383 count++; | 384 count++; |
384 node = node->next(); | 385 node = node->next(); |
(...skipping 4605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4990 v8::Local<v8::Function> f = | 4991 v8::Local<v8::Function> f = |
4991 v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("f"))); | 4992 v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("f"))); |
4992 f->Call(env->Global(), 0, NULL); | 4993 f->Call(env->Global(), 0, NULL); |
4993 | 4994 |
4994 // Setting message handler to NULL should cause debugger unload. | 4995 // Setting message handler to NULL should cause debugger unload. |
4995 v8::Debug::SetMessageHandler2(NULL); | 4996 v8::Debug::SetMessageHandler2(NULL); |
4996 CheckDebuggerUnloaded(); | 4997 CheckDebuggerUnloaded(); |
4997 | 4998 |
4998 CHECK_EQ(1, exception_event_count); | 4999 CHECK_EQ(1, exception_event_count); |
4999 } | 5000 } |
OLD | NEW |