Chromium Code Reviews| 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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 962 StackFrameIterator iterator_; | 962 StackFrameIterator iterator_; |
| 963 }; | 963 }; |
| 964 | 964 |
| 965 | 965 |
| 966 typedef JavaScriptFrameIteratorTemp<SafeStackFrameIterator> | 966 typedef JavaScriptFrameIteratorTemp<SafeStackFrameIterator> |
| 967 SafeJavaScriptFrameIterator; | 967 SafeJavaScriptFrameIterator; |
| 968 | 968 |
| 969 | 969 |
| 970 class SafeStackTraceFrameIterator: public SafeJavaScriptFrameIterator { | 970 class SafeStackTraceFrameIterator: public SafeJavaScriptFrameIterator { |
| 971 public: | 971 public: |
| 972 explicit SafeStackTraceFrameIterator(Isolate* isolate, | 972 SafeStackTraceFrameIterator(Isolate* isolate, Address fp, Address sp, |
|
Jakob Kummerow
2013/04/30 13:30:31
nit: for method/ctor definitions, one line per arg
yurys
2013/04/30 14:37:05
Done.
| |
| 973 Address fp, Address sp, | 973 Address low_bound, Address high_bound); |
| 974 Address low_bound, Address high_bound); | |
| 975 void Advance(); | 974 void Advance(); |
| 976 }; | 975 }; |
| 977 | 976 |
| 978 | 977 |
| 979 class StackFrameLocator BASE_EMBEDDED { | 978 class StackFrameLocator BASE_EMBEDDED { |
| 980 public: | 979 public: |
| 981 explicit StackFrameLocator(Isolate* isolate) : iterator_(isolate) {} | 980 explicit StackFrameLocator(Isolate* isolate) : iterator_(isolate) {} |
| 982 | 981 |
| 983 // Find the nth JavaScript frame on the stack. The caller must | 982 // Find the nth JavaScript frame on the stack. The caller must |
| 984 // guarantee that such a frame exists. | 983 // guarantee that such a frame exists. |
| 985 JavaScriptFrame* FindJavaScriptFrame(int n); | 984 JavaScriptFrame* FindJavaScriptFrame(int n); |
| 986 | 985 |
| 987 private: | 986 private: |
| 988 StackFrameIterator iterator_; | 987 StackFrameIterator iterator_; |
| 989 }; | 988 }; |
| 990 | 989 |
| 991 | 990 |
| 992 // Reads all frames on the current stack and copies them into the current | 991 // Reads all frames on the current stack and copies them into the current |
| 993 // zone memory. | 992 // zone memory. |
| 994 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 993 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
| 995 | 994 |
| 996 } } // namespace v8::internal | 995 } } // namespace v8::internal |
| 997 | 996 |
| 998 #endif // V8_FRAMES_H_ | 997 #endif // V8_FRAMES_H_ |
| OLD | NEW |