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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 if (!column_key_.is_null()) { | 621 if (!column_key_.is_null()) { |
622 Code* code = frame->LookupCode(); | 622 Code* code = frame->LookupCode(); |
623 int offset = static_cast<int>(frame->pc() - code->instruction_start()); | 623 int offset = static_cast<int>(frame->pc() - code->instruction_start()); |
624 int position = code->SourcePosition(offset); | 624 int position = code->SourcePosition(offset); |
625 // Make position 1-based. | 625 // Make position 1-based. |
626 if (position >= 0) ++position; | 626 if (position >= 0) ++position; |
627 JSObject::AddProperty(stack_frame, column_key_, | 627 JSObject::AddProperty(stack_frame, column_key_, |
628 isolate_->factory()->NewNumberFromInt(position), | 628 isolate_->factory()->NewNumberFromInt(position), |
629 NONE); | 629 NONE); |
630 } | 630 } |
| 631 if (!script_id_key_.is_null()) { |
| 632 int script_id = frame->script()->id(); |
| 633 JSObject::AddProperty(stack_frame, script_id_key_, |
| 634 handle(Smi::FromInt(script_id), isolate_), NONE); |
| 635 } |
631 | 636 |
632 return stack_frame; | 637 return stack_frame; |
633 } | 638 } |
634 | 639 |
635 private: | 640 private: |
636 inline Factory* factory() { return isolate_->factory(); } | 641 inline Factory* factory() { return isolate_->factory(); } |
637 | 642 |
638 Isolate* isolate_; | 643 Isolate* isolate_; |
639 Handle<String> column_key_; | 644 Handle<String> column_key_; |
640 Handle<String> line_key_; | 645 Handle<String> line_key_; |
(...skipping 2401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3042 // Then check whether this scope intercepts. | 3047 // Then check whether this scope intercepts. |
3043 if ((flag & intercept_mask_)) { | 3048 if ((flag & intercept_mask_)) { |
3044 intercepted_flags_ |= flag; | 3049 intercepted_flags_ |= flag; |
3045 return true; | 3050 return true; |
3046 } | 3051 } |
3047 return false; | 3052 return false; |
3048 } | 3053 } |
3049 | 3054 |
3050 } // namespace internal | 3055 } // namespace internal |
3051 } // namespace v8 | 3056 } // namespace v8 |
OLD | NEW |