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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 Handle<Script> script(Script::cast(maybe_script)); | 782 Handle<Script> script(Script::cast(maybe_script)); |
783 int line = GetScriptLineNumberSafe(script, source_pos) + 1; | 783 int line = GetScriptLineNumberSafe(script, source_pos) + 1; |
784 Object* script_name_raw = script->name(); | 784 Object* script_name_raw = script->name(); |
785 if (script_name_raw->IsString()) { | 785 if (script_name_raw->IsString()) { |
786 String* script_name = String::cast(script->name()); | 786 String* script_name = String::cast(script->name()); |
787 SmartArrayPointer<char> c_script_name = | 787 SmartArrayPointer<char> c_script_name = |
788 script_name->ToCString(DISALLOW_NULLS, | 788 script_name->ToCString(DISALLOW_NULLS, |
789 ROBUST_STRING_TRAVERSAL); | 789 ROBUST_STRING_TRAVERSAL); |
790 PrintF(file, " at %s:%d", *c_script_name, line); | 790 PrintF(file, " at %s:%d", *c_script_name, line); |
791 } else { | 791 } else { |
792 PrintF(file, "at <unknown>:%d", line); | 792 PrintF(file, " at <unknown>:%d", line); |
793 } | 793 } |
794 } else { | 794 } else { |
795 PrintF(file, " at <unknown>:<unknown>"); | 795 PrintF(file, " at <unknown>:<unknown>"); |
796 } | 796 } |
797 } | 797 } |
798 } else { | 798 } else { |
799 PrintF("<unknown>"); | 799 PrintF("<unknown>"); |
800 } | 800 } |
801 | 801 |
802 if (print_args) { | 802 if (print_args) { |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 ZoneList<StackFrame*> list(10, zone); | 1436 ZoneList<StackFrame*> list(10, zone); |
1437 for (StackFrameIterator it; !it.done(); it.Advance()) { | 1437 for (StackFrameIterator it; !it.done(); it.Advance()) { |
1438 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1438 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1439 list.Add(frame, zone); | 1439 list.Add(frame, zone); |
1440 } | 1440 } |
1441 return list.ToVector(); | 1441 return list.ToVector(); |
1442 } | 1442 } |
1443 | 1443 |
1444 | 1444 |
1445 } } // namespace v8::internal | 1445 } } // namespace v8::internal |
OLD | NEW |