OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 // Just continue if breaks are disabled. | 585 // Just continue if breaks are disabled. |
586 if (Debug::disable_break()) { | 586 if (Debug::disable_break()) { |
587 return Heap::undefined_value(); | 587 return Heap::undefined_value(); |
588 } | 588 } |
589 | 589 |
590 { | 590 { |
591 JavaScriptFrameIterator it; | 591 JavaScriptFrameIterator it; |
592 ASSERT(!it.done()); | 592 ASSERT(!it.done()); |
593 Object* fun = it.frame()->function(); | 593 Object* fun = it.frame()->function(); |
594 if (fun && fun->IsJSFunction()) { | 594 if (fun && fun->IsJSFunction()) { |
| 595 // Don't stop in builtin functions. |
| 596 if (JSFunction::cast(fun)->IsBuiltin()) { |
| 597 return Heap::undefined_value(); |
| 598 } |
595 GlobalObject* global = JSFunction::cast(fun)->context()->global(); | 599 GlobalObject* global = JSFunction::cast(fun)->context()->global(); |
596 // Don't stop in builtin functions. | |
597 if (global == Top::context()->builtins()) { | |
598 return Heap::undefined_value(); | |
599 } | |
600 // Don't stop in debugger functions. | 600 // Don't stop in debugger functions. |
601 if (Debug::IsDebugGlobal(global)) { | 601 if (Debug::IsDebugGlobal(global)) { |
602 return Heap::undefined_value(); | 602 return Heap::undefined_value(); |
603 } | 603 } |
604 } | 604 } |
605 } | 605 } |
606 | 606 |
607 // Collect the break state before clearing the flags. | 607 // Collect the break state before clearing the flags. |
608 bool debug_command_only = | 608 bool debug_command_only = |
609 StackGuard::IsDebugCommand() && !StackGuard::IsDebugBreak(); | 609 StackGuard::IsDebugCommand() && !StackGuard::IsDebugBreak(); |
610 | 610 |
611 // Clear the debug request flags. | 611 // Clear the debug request flags. |
612 StackGuard::Continue(DEBUGBREAK); | 612 StackGuard::Continue(DEBUGBREAK); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 // All allocation spaces other than NEW_SPACE have the same effect. | 658 // All allocation spaces other than NEW_SPACE have the same effect. |
659 Heap::CollectAllGarbage(); | 659 Heap::CollectAllGarbage(); |
660 return v8::Undefined(); | 660 return v8::Undefined(); |
661 } | 661 } |
662 | 662 |
663 | 663 |
664 static GCExtension kGCExtension; | 664 static GCExtension kGCExtension; |
665 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); | 665 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); |
666 | 666 |
667 } } // namespace v8::internal | 667 } } // namespace v8::internal |
OLD | NEW |