OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/frames.h" | 5 #include "src/frames.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 if (IsValidFrame()) return; | 177 if (IsValidFrame()) return; |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 | 181 |
182 bool StackTraceFrameIterator::IsValidFrame() { | 182 bool StackTraceFrameIterator::IsValidFrame() { |
183 if (!frame()->function()->IsJSFunction()) return false; | 183 if (!frame()->function()->IsJSFunction()) return false; |
184 Object* script = frame()->function()->shared()->script(); | 184 Object* script = frame()->function()->shared()->script(); |
185 // Don't show functions from native scripts to user. | 185 // Don't show functions from native scripts to user. |
186 return (script->IsScript() && | 186 return (script->IsScript() && |
187 Script::TYPE_NATIVE != Script::cast(script)->type()->value()); | 187 Script::TYPE_NATIVE != Script::cast(script)->type()); |
188 } | 188 } |
189 | 189 |
190 | 190 |
191 // ------------------------------------------------------------------------- | 191 // ------------------------------------------------------------------------- |
192 | 192 |
193 | 193 |
194 SafeStackFrameIterator::SafeStackFrameIterator( | 194 SafeStackFrameIterator::SafeStackFrameIterator( |
195 Isolate* isolate, | 195 Isolate* isolate, |
196 Address fp, Address sp, Address js_entry_sp) | 196 Address fp, Address sp, Address js_entry_sp) |
197 : StackFrameIteratorBase(isolate, false), | 197 : StackFrameIteratorBase(isolate, false), |
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1583 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1583 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1584 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1584 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1585 list.Add(frame, zone); | 1585 list.Add(frame, zone); |
1586 } | 1586 } |
1587 return list.ToVector(); | 1587 return list.ToVector(); |
1588 } | 1588 } |
1589 | 1589 |
1590 | 1590 |
1591 } // namespace internal | 1591 } // namespace internal |
1592 } // namespace v8 | 1592 } // namespace v8 |
OLD | NEW |