Chromium Code Reviews| Index: src/isolate.cc |
| diff --git a/src/isolate.cc b/src/isolate.cc |
| index 6c797b252280a75680aa1f1c0f23cf58557d9f7e..68c8fe6844ab62ee195280fa51d9af2a0913c3c9 100644 |
| --- a/src/isolate.cc |
| +++ b/src/isolate.cc |
| @@ -721,6 +721,17 @@ void Isolate::CaptureAndSetDetailedStackTrace(Handle<JSObject> error_object) { |
| } |
| +StackFrame* Isolate::TopOptimizedFrame() { |
| + for (StackFrameIterator it(this, thread_local_top()); |
| + !it.done(); it.Advance()) { |
| + if (it.frame()->type() == StackFrame::OPTIMIZED) { |
|
Michael Starzinger
2013/07/02 14:20:54
Shouldn't this actually just look whether the top-
ulan
2013/07/02 14:45:41
Added a check for non-optimized frame.
On 2013/07
|
| + return it.frame(); |
| + } |
| + } |
| + return NULL; |
| +} |
| + |
| + |
| Handle<JSArray> Isolate::CaptureCurrentStackTrace( |
| int frame_limit, StackTrace::StackTraceOptions options) { |
| // Ensure no negative values. |