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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 Object* maybe_script = shared->script(); | 817 Object* maybe_script = shared->script(); |
818 if (maybe_script->IsScript()) { | 818 if (maybe_script->IsScript()) { |
819 Handle<Script> script(Script::cast(maybe_script)); | 819 Handle<Script> script(Script::cast(maybe_script)); |
820 int line = GetScriptLineNumberSafe(script, source_pos) + 1; | 820 int line = GetScriptLineNumberSafe(script, source_pos) + 1; |
821 Object* script_name_raw = script->name(); | 821 Object* script_name_raw = script->name(); |
822 if (script_name_raw->IsString()) { | 822 if (script_name_raw->IsString()) { |
823 String* script_name = String::cast(script->name()); | 823 String* script_name = String::cast(script->name()); |
824 SmartArrayPointer<char> c_script_name = | 824 SmartArrayPointer<char> c_script_name = |
825 script_name->ToCString(DISALLOW_NULLS, | 825 script_name->ToCString(DISALLOW_NULLS, |
826 ROBUST_STRING_TRAVERSAL); | 826 ROBUST_STRING_TRAVERSAL); |
827 PrintF(file, " at %s:%d", *c_script_name, line); | 827 PrintF(file, " at %s:%d", c_script_name.get(), line); |
828 } else { | 828 } else { |
829 PrintF(file, " at <unknown>:%d", line); | 829 PrintF(file, " at <unknown>:%d", line); |
830 } | 830 } |
831 } else { | 831 } else { |
832 PrintF(file, " at <unknown>:<unknown>"); | 832 PrintF(file, " at <unknown>:<unknown>"); |
833 } | 833 } |
834 } | 834 } |
835 | 835 |
836 if (print_args) { | 836 if (print_args) { |
837 // function arguments | 837 // function arguments |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1638 ZoneList<StackFrame*> list(10, zone); | 1638 ZoneList<StackFrame*> list(10, zone); |
1639 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1639 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1640 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1640 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1641 list.Add(frame, zone); | 1641 list.Add(frame, zone); |
1642 } | 1642 } |
1643 return list.ToVector(); | 1643 return list.ToVector(); |
1644 } | 1644 } |
1645 | 1645 |
1646 | 1646 |
1647 } } // namespace v8::internal | 1647 } } // namespace v8::internal |
OLD | NEW |