| 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 if (!column_key_.is_null()) { | 620 if (!column_key_.is_null()) { |
| 621 Code* code = frame->LookupCode(); | 621 Code* code = frame->LookupCode(); |
| 622 int offset = static_cast<int>(frame->pc() - code->instruction_start()); | 622 int offset = static_cast<int>(frame->pc() - code->instruction_start()); |
| 623 int position = code->SourcePosition(offset); | 623 int position = code->SourcePosition(offset); |
| 624 // Make position 1-based. | 624 // Make position 1-based. |
| 625 if (position >= 0) ++position; | 625 if (position >= 0) ++position; |
| 626 JSObject::AddProperty(stack_frame, column_key_, | 626 JSObject::AddProperty(stack_frame, column_key_, |
| 627 isolate_->factory()->NewNumberFromInt(position), | 627 isolate_->factory()->NewNumberFromInt(position), |
| 628 NONE); | 628 NONE); |
| 629 } | 629 } |
| 630 if (!script_id_key_.is_null()) { |
| 631 int script_id = frame->script()->id(); |
| 632 JSObject::AddProperty(stack_frame, script_id_key_, |
| 633 handle(Smi::FromInt(script_id), isolate_), NONE); |
| 634 } |
| 630 | 635 |
| 631 return stack_frame; | 636 return stack_frame; |
| 632 } | 637 } |
| 633 | 638 |
| 634 private: | 639 private: |
| 635 inline Factory* factory() { return isolate_->factory(); } | 640 inline Factory* factory() { return isolate_->factory(); } |
| 636 | 641 |
| 637 Isolate* isolate_; | 642 Isolate* isolate_; |
| 638 Handle<String> column_key_; | 643 Handle<String> column_key_; |
| 639 Handle<String> line_key_; | 644 Handle<String> line_key_; |
| (...skipping 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3064 // Then check whether this scope intercepts. | 3069 // Then check whether this scope intercepts. |
| 3065 if ((flag & intercept_mask_)) { | 3070 if ((flag & intercept_mask_)) { |
| 3066 intercepted_flags_ |= flag; | 3071 intercepted_flags_ |= flag; |
| 3067 return true; | 3072 return true; |
| 3068 } | 3073 } |
| 3069 return false; | 3074 return false; |
| 3070 } | 3075 } |
| 3071 | 3076 |
| 3072 } // namespace internal | 3077 } // namespace internal |
| 3073 } // namespace v8 | 3078 } // namespace v8 |
| OLD | NEW |