Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: src/isolate.cc

Issue 301633005: Merge Debugger and Debug. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/isolate.h ('k') | src/liveedit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "v8.h" 7 #include "v8.h"
8 8
9 #include "ast.h" 9 #include "ast.h"
10 #include "bootstrapper.h" 10 #include "bootstrapper.h"
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 bool report_exception = catchable_by_javascript && should_report_exception; 1029 bool report_exception = catchable_by_javascript && should_report_exception;
1030 bool try_catch_needs_message = 1030 bool try_catch_needs_message =
1031 can_be_caught_externally && try_catch_handler()->capture_message_ && 1031 can_be_caught_externally && try_catch_handler()->capture_message_ &&
1032 !thread_local_top()->rethrowing_message_; 1032 !thread_local_top()->rethrowing_message_;
1033 bool bootstrapping = bootstrapper()->IsActive(); 1033 bool bootstrapping = bootstrapper()->IsActive();
1034 1034
1035 thread_local_top()->rethrowing_message_ = false; 1035 thread_local_top()->rethrowing_message_ = false;
1036 1036
1037 // Notify debugger of exception. 1037 // Notify debugger of exception.
1038 if (catchable_by_javascript) { 1038 if (catchable_by_javascript) {
1039 debugger_->OnException(exception_handle, report_exception); 1039 debug()->OnException(exception_handle, report_exception);
1040 } 1040 }
1041 1041
1042 // Generate the message if required. 1042 // Generate the message if required.
1043 if (report_exception || try_catch_needs_message) { 1043 if (report_exception || try_catch_needs_message) {
1044 MessageLocation potential_computed_location; 1044 MessageLocation potential_computed_location;
1045 if (location == NULL) { 1045 if (location == NULL) {
1046 // If no location was specified we use a computed one instead. 1046 // If no location was specified we use a computed one instead.
1047 ComputeLocation(&potential_computed_location); 1047 ComputeLocation(&potential_computed_location);
1048 location = &potential_computed_location; 1048 location = &potential_computed_location;
1049 } 1049 }
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 ISOLATE_INIT_LIST(ISOLATE_INIT_EXECUTE) 1513 ISOLATE_INIT_LIST(ISOLATE_INIT_EXECUTE)
1514 #undef ISOLATE_INIT_EXECUTE 1514 #undef ISOLATE_INIT_EXECUTE
1515 1515
1516 #define ISOLATE_INIT_ARRAY_EXECUTE(type, name, length) \ 1516 #define ISOLATE_INIT_ARRAY_EXECUTE(type, name, length) \
1517 memset(name##_, 0, sizeof(type) * length); 1517 memset(name##_, 0, sizeof(type) * length);
1518 ISOLATE_INIT_ARRAY_LIST(ISOLATE_INIT_ARRAY_EXECUTE) 1518 ISOLATE_INIT_ARRAY_LIST(ISOLATE_INIT_ARRAY_EXECUTE)
1519 #undef ISOLATE_INIT_ARRAY_EXECUTE 1519 #undef ISOLATE_INIT_ARRAY_EXECUTE
1520 1520
1521 InitializeLoggingAndCounters(); 1521 InitializeLoggingAndCounters();
1522 debug_ = new Debug(this); 1522 debug_ = new Debug(this);
1523 debugger_ = new Debugger(this);
1524 } 1523 }
1525 1524
1526 1525
1527 void Isolate::TearDown() { 1526 void Isolate::TearDown() {
1528 TRACE_ISOLATE(tear_down); 1527 TRACE_ISOLATE(tear_down);
1529 1528
1530 // Temporarily set this isolate as current so that various parts of 1529 // Temporarily set this isolate as current so that various parts of
1531 // the isolate can access it in their destructors without having a 1530 // the isolate can access it in their destructors without having a
1532 // direct pointer. We don't use Enter/Exit here to avoid 1531 // direct pointer. We don't use Enter/Exit here to avoid
1533 // initializing the thread data. 1532 // initializing the thread data.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 1724
1726 delete string_stream_debug_object_cache_; 1725 delete string_stream_debug_object_cache_;
1727 string_stream_debug_object_cache_ = NULL; 1726 string_stream_debug_object_cache_ = NULL;
1728 1727
1729 delete external_reference_table_; 1728 delete external_reference_table_;
1730 external_reference_table_ = NULL; 1729 external_reference_table_ = NULL;
1731 1730
1732 delete random_number_generator_; 1731 delete random_number_generator_;
1733 random_number_generator_ = NULL; 1732 random_number_generator_ = NULL;
1734 1733
1735 delete debugger_;
1736 debugger_ = NULL;
1737 delete debug_; 1734 delete debug_;
1738 debug_ = NULL; 1735 debug_ = NULL;
1739 } 1736 }
1740 1737
1741 1738
1742 void Isolate::InitializeThreadLocal() { 1739 void Isolate::InitializeThreadLocal() {
1743 thread_local_top_.isolate_ = this; 1740 thread_local_top_.isolate_ = this;
1744 thread_local_top_.Initialize(); 1741 thread_local_top_.Initialize();
1745 } 1742 }
1746 1743
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 Execution::Call(this, microtask, factory()->undefined_value(), 2305 Execution::Call(this, microtask, factory()->undefined_value(),
2309 0, NULL).Check(); 2306 0, NULL).Check();
2310 } 2307 }
2311 } 2308 }
2312 2309
2313 handle_scope_implementer()->DecrementCallDepth(); 2310 handle_scope_implementer()->DecrementCallDepth();
2314 } 2311 }
2315 2312
2316 2313
2317 } } // namespace v8::internal 2314 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698