| 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/isolate.h" | 5 #include "src/isolate.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 // Set initial size to the maximum inlining level + 1 for the outermost | 766 // Set initial size to the maximum inlining level + 1 for the outermost |
| 767 // function. | 767 // function. |
| 768 List<FrameSummary> frames(FLAG_max_inlining_levels + 1); | 768 List<FrameSummary> frames(FLAG_max_inlining_levels + 1); |
| 769 JavaScriptFrame::cast(frame)->Summarize(&frames); | 769 JavaScriptFrame::cast(frame)->Summarize(&frames); |
| 770 for (int i = frames.length() - 1; i >= 0 && frames_seen < limit; i--) { | 770 for (int i = frames.length() - 1; i >= 0 && frames_seen < limit; i--) { |
| 771 Handle<JSFunction> fun = frames[i].function(); | 771 Handle<JSFunction> fun = frames[i].function(); |
| 772 // Filter frames from other security contexts. | 772 // Filter frames from other security contexts. |
| 773 if (!(options & StackTrace::kExposeFramesAcrossSecurityOrigins) && | 773 if (!(options & StackTrace::kExposeFramesAcrossSecurityOrigins) && |
| 774 !this->context()->HasSameSecurityTokenAs(fun->context())) | 774 !this->context()->HasSameSecurityTokenAs(fun->context())) |
| 775 continue; | 775 continue; |
| 776 Object* script_obj = fun->shared()->script(); |
| 777 if (!script_obj->IsUndefined(this)) { |
| 778 Script* script = Script::cast(script_obj); |
| 779 if (script->origin_options().IsEmbedderDebugScript()) continue; |
| 780 } |
| 776 Handle<JSObject> new_frame_obj = helper.NewStackFrameObject(frames[i]); | 781 Handle<JSObject> new_frame_obj = helper.NewStackFrameObject(frames[i]); |
| 777 stack_trace_elems->set(frames_seen, *new_frame_obj); | 782 stack_trace_elems->set(frames_seen, *new_frame_obj); |
| 778 frames_seen++; | 783 frames_seen++; |
| 779 } | 784 } |
| 780 } else { | 785 } else { |
| 781 DCHECK(frame->is_wasm()); | 786 DCHECK(frame->is_wasm()); |
| 782 WasmFrame* wasm_frame = WasmFrame::cast(frame); | 787 WasmFrame* wasm_frame = WasmFrame::cast(frame); |
| 783 Handle<JSObject> new_frame_obj = helper.NewStackFrameObject(wasm_frame); | 788 Handle<JSObject> new_frame_obj = helper.NewStackFrameObject(wasm_frame); |
| 784 stack_trace_elems->set(frames_seen, *new_frame_obj); | 789 stack_trace_elems->set(frames_seen, *new_frame_obj); |
| 785 frames_seen++; | 790 frames_seen++; |
| (...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3488 // Then check whether this scope intercepts. | 3493 // Then check whether this scope intercepts. |
| 3489 if ((flag & intercept_mask_)) { | 3494 if ((flag & intercept_mask_)) { |
| 3490 intercepted_flags_ |= flag; | 3495 intercepted_flags_ |= flag; |
| 3491 return true; | 3496 return true; |
| 3492 } | 3497 } |
| 3493 return false; | 3498 return false; |
| 3494 } | 3499 } |
| 3495 | 3500 |
| 3496 } // namespace internal | 3501 } // namespace internal |
| 3497 } // namespace v8 | 3502 } // namespace v8 |
| OLD | NEW |