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

Side by Side Diff: src/isolate.cc

Issue 266533003: Reland "Trigger exception debug event for promises at the throw site." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 7 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
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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 bool report_exception = catchable_by_javascript && should_report_exception; 1024 bool report_exception = catchable_by_javascript && should_report_exception;
1025 bool try_catch_needs_message = 1025 bool try_catch_needs_message =
1026 can_be_caught_externally && try_catch_handler()->capture_message_ && 1026 can_be_caught_externally && try_catch_handler()->capture_message_ &&
1027 !thread_local_top()->rethrowing_message_; 1027 !thread_local_top()->rethrowing_message_;
1028 bool bootstrapping = bootstrapper()->IsActive(); 1028 bool bootstrapping = bootstrapper()->IsActive();
1029 1029
1030 thread_local_top()->rethrowing_message_ = false; 1030 thread_local_top()->rethrowing_message_ = false;
1031 1031
1032 // Notify debugger of exception. 1032 // Notify debugger of exception.
1033 if (catchable_by_javascript) { 1033 if (catchable_by_javascript) {
1034 debugger_->OnException( 1034 debugger_->OnException(exception_handle, report_exception);
1035 exception_handle, report_exception, factory()->undefined_value());
1036 } 1035 }
1037 1036
1038 // Generate the message if required. 1037 // Generate the message if required.
1039 if (report_exception || try_catch_needs_message) { 1038 if (report_exception || try_catch_needs_message) {
1040 MessageLocation potential_computed_location; 1039 MessageLocation potential_computed_location;
1041 if (location == NULL) { 1040 if (location == NULL) {
1042 // If no location was specified we use a computed one instead. 1041 // If no location was specified we use a computed one instead.
1043 ComputeLocation(&potential_computed_location); 1042 ComputeLocation(&potential_computed_location);
1044 location = &potential_computed_location; 1043 location = &potential_computed_location;
1045 } 1044 }
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2247 handle_scope_implementer()->IncrementCallDepth(); 2246 handle_scope_implementer()->IncrementCallDepth();
2248 if (run_microtasks) Execution::RunMicrotasks(this); 2247 if (run_microtasks) Execution::RunMicrotasks(this);
2249 for (int i = 0; i < call_completed_callbacks_.length(); i++) { 2248 for (int i = 0; i < call_completed_callbacks_.length(); i++) {
2250 call_completed_callbacks_.at(i)(); 2249 call_completed_callbacks_.at(i)();
2251 } 2250 }
2252 handle_scope_implementer()->DecrementCallDepth(); 2251 handle_scope_implementer()->DecrementCallDepth();
2253 } 2252 }
2254 2253
2255 2254
2256 } } // namespace v8::internal 2255 } } // namespace v8::internal
OLDNEW
« src/debug.cc ('K') | « src/debug-debugger.js ('k') | src/mirror-debugger.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698