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 759 matching lines...) Loading... |
770 functions->Add(summary); | 770 functions->Add(summary); |
771 } | 771 } |
772 | 772 |
773 | 773 |
774 void JavaScriptFrame::PrintTop(Isolate* isolate, | 774 void JavaScriptFrame::PrintTop(Isolate* isolate, |
775 FILE* file, | 775 FILE* file, |
776 bool print_args, | 776 bool print_args, |
777 bool print_line_number) { | 777 bool print_line_number) { |
778 // constructor calls | 778 // constructor calls |
779 HandleScope scope(isolate); | 779 HandleScope scope(isolate); |
780 AssertNoAllocation no_allocation; | 780 DisallowHeapAllocation no_allocation; |
781 JavaScriptFrameIterator it(isolate); | 781 JavaScriptFrameIterator it(isolate); |
782 while (!it.done()) { | 782 while (!it.done()) { |
783 if (it.frame()->is_java_script()) { | 783 if (it.frame()->is_java_script()) { |
784 JavaScriptFrame* frame = it.frame(); | 784 JavaScriptFrame* frame = it.frame(); |
785 if (frame->IsConstructor()) PrintF(file, "new "); | 785 if (frame->IsConstructor()) PrintF(file, "new "); |
786 // function name | 786 // function name |
787 Object* maybe_fun = frame->function(); | 787 Object* maybe_fun = frame->function(); |
788 if (maybe_fun->IsJSFunction()) { | 788 if (maybe_fun->IsJSFunction()) { |
789 JSFunction* fun = JSFunction::cast(maybe_fun); | 789 JSFunction* fun = JSFunction::cast(maybe_fun); |
790 fun->PrintName(); | 790 fun->PrintName(); |
(...skipping 823 matching lines...) Loading... |
1614 ZoneList<StackFrame*> list(10, zone); | 1614 ZoneList<StackFrame*> list(10, zone); |
1615 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1615 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1616 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1616 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1617 list.Add(frame, zone); | 1617 list.Add(frame, zone); |
1618 } | 1618 } |
1619 return list.ToVector(); | 1619 return list.ToVector(); |
1620 } | 1620 } |
1621 | 1621 |
1622 | 1622 |
1623 } } // namespace v8::internal | 1623 } } // namespace v8::internal |
OLD | NEW |