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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2551 Handle<JSObject> jspromise = Handle<JSObject>::cast(promise); | 2551 Handle<JSObject> jspromise = Handle<JSObject>::cast(promise); |
2552 // Mark the promise as already having triggered a message. | 2552 // Mark the promise as already having triggered a message. |
2553 Handle<Symbol> key = isolate_->factory()->promise_debug_marker_symbol(); | 2553 Handle<Symbol> key = isolate_->factory()->promise_debug_marker_symbol(); |
2554 JSObject::SetProperty(jspromise, key, key, STRICT).Assert(); | 2554 JSObject::SetProperty(jspromise, key, key, STRICT).Assert(); |
2555 // Check whether the promise reject is considered an uncaught exception. | 2555 // Check whether the promise reject is considered an uncaught exception. |
2556 Handle<Object> has_reject_handler; | 2556 Handle<Object> has_reject_handler; |
2557 ASSIGN_RETURN_ON_EXCEPTION_VALUE( | 2557 ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
2558 isolate_, has_reject_handler, | 2558 isolate_, has_reject_handler, |
2559 PromiseHasUserDefinedRejectHandler(jspromise), /* void */); | 2559 PromiseHasUserDefinedRejectHandler(jspromise), /* void */); |
2560 uncaught = has_reject_handler->IsFalse(); | 2560 uncaught = has_reject_handler->IsFalse(); |
| 2561 } else if (!uncaught && promise->IsNull()) { |
| 2562 uncaught = true; |
2561 } | 2563 } |
2562 // Bail out if exception breaks are not active | 2564 // Bail out if exception breaks are not active |
2563 if (uncaught) { | 2565 if (uncaught) { |
2564 // Uncaught exceptions are reported by either flags. | 2566 // Uncaught exceptions are reported by either flags. |
2565 if (!(break_on_uncaught_exception_ || break_on_exception_)) return; | 2567 if (!(break_on_uncaught_exception_ || break_on_exception_)) return; |
2566 } else { | 2568 } else { |
2567 // Caught exceptions are reported is activated. | 2569 // Caught exceptions are reported is activated. |
2568 if (!break_on_exception_) return; | 2570 if (!break_on_exception_) return; |
2569 } | 2571 } |
2570 | 2572 |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3402 logger_->DebugEvent("Put", message.text()); | 3404 logger_->DebugEvent("Put", message.text()); |
3403 } | 3405 } |
3404 | 3406 |
3405 | 3407 |
3406 void LockingCommandMessageQueue::Clear() { | 3408 void LockingCommandMessageQueue::Clear() { |
3407 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3409 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
3408 queue_.Clear(); | 3410 queue_.Clear(); |
3409 } | 3411 } |
3410 | 3412 |
3411 } } // namespace v8::internal | 3413 } } // namespace v8::internal |
OLD | NEW |