| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 11211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11222 // Get the debug info (create it if it does not exist). | 11222 // Get the debug info (create it if it does not exist). |
| 11223 if (!isolate->debug()->EnsureDebugInfo(shared_info, function_)) { | 11223 if (!isolate->debug()->EnsureDebugInfo(shared_info, function_)) { |
| 11224 // Return if ensuring debug info failed. | 11224 // Return if ensuring debug info failed. |
| 11225 return; | 11225 return; |
| 11226 } | 11226 } |
| 11227 Handle<DebugInfo> debug_info = Debug::GetDebugInfo(shared_info); | 11227 Handle<DebugInfo> debug_info = Debug::GetDebugInfo(shared_info); |
| 11228 | 11228 |
| 11229 // Find the break point where execution has stopped. | 11229 // Find the break point where execution has stopped. |
| 11230 BreakLocationIterator break_location_iterator(debug_info, | 11230 BreakLocationIterator break_location_iterator(debug_info, |
| 11231 ALL_BREAK_LOCATIONS); | 11231 ALL_BREAK_LOCATIONS); |
| 11232 break_location_iterator.FindBreakLocationFromAddress(frame->pc()); | 11232 // pc points to the instruction after the current one, possibly a break |
| 11233 // location as well. So the "- 1" to exclude it from the search. |
| 11234 break_location_iterator.FindBreakLocationFromAddress(frame->pc() - 1); |
| 11233 if (break_location_iterator.IsExit()) { | 11235 if (break_location_iterator.IsExit()) { |
| 11234 // We are within the return sequence. At the momemt it is not possible to | 11236 // We are within the return sequence. At the momemt it is not possible to |
| 11235 // get a source position which is consistent with the current scope chain. | 11237 // get a source position which is consistent with the current scope chain. |
| 11236 // Thus all nested with, catch and block contexts are skipped and we only | 11238 // Thus all nested with, catch and block contexts are skipped and we only |
| 11237 // provide the function scope. | 11239 // provide the function scope. |
| 11238 if (scope_info->HasContext()) { | 11240 if (scope_info->HasContext()) { |
| 11239 context_ = Handle<Context>(context_->declaration_context(), isolate_); | 11241 context_ = Handle<Context>(context_->declaration_context(), isolate_); |
| 11240 } else { | 11242 } else { |
| 11241 while (context_->closure() == *function_) { | 11243 while (context_->closure() == *function_) { |
| 11242 context_ = Handle<Context>(context_->previous(), isolate_); | 11244 context_ = Handle<Context>(context_->previous(), isolate_); |
| (...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13631 // Handle last resort GC and make sure to allow future allocations | 13633 // Handle last resort GC and make sure to allow future allocations |
| 13632 // to grow the heap without causing GCs (if possible). | 13634 // to grow the heap without causing GCs (if possible). |
| 13633 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13635 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13634 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13636 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13635 "Runtime::PerformGC"); | 13637 "Runtime::PerformGC"); |
| 13636 } | 13638 } |
| 13637 } | 13639 } |
| 13638 | 13640 |
| 13639 | 13641 |
| 13640 } } // namespace v8::internal | 13642 } } // namespace v8::internal |
| OLD | NEW |