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 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 OnException(value, promise); | 2511 OnException(value, promise); |
2512 } | 2512 } |
2513 } | 2513 } |
2514 | 2514 |
2515 | 2515 |
2516 MaybeHandle<Object> Debug::PromiseHasUserDefinedRejectHandler( | 2516 MaybeHandle<Object> Debug::PromiseHasUserDefinedRejectHandler( |
2517 Handle<JSObject> promise) { | 2517 Handle<JSObject> promise) { |
2518 Handle<JSFunction> fun = Handle<JSFunction>::cast( | 2518 Handle<JSFunction> fun = Handle<JSFunction>::cast( |
2519 JSObject::GetDataProperty(isolate_->js_builtins_object(), | 2519 JSObject::GetDataProperty(isolate_->js_builtins_object(), |
2520 isolate_->factory()->NewStringFromStaticChars( | 2520 isolate_->factory()->NewStringFromStaticChars( |
2521 "PromiseHasUserDefinedRejectHandler"))); | 2521 "$promiseHasUserDefinedRejectHandler"))); |
2522 return Execution::Call(isolate_, fun, promise, 0, NULL); | 2522 return Execution::Call(isolate_, fun, promise, 0, NULL); |
2523 } | 2523 } |
2524 | 2524 |
2525 | 2525 |
2526 void Debug::OnException(Handle<Object> exception, Handle<Object> promise) { | 2526 void Debug::OnException(Handle<Object> exception, Handle<Object> promise) { |
2527 Isolate::CatchType catch_type = isolate_->PredictExceptionCatcher(); | 2527 Isolate::CatchType catch_type = isolate_->PredictExceptionCatcher(); |
2528 bool uncaught = (catch_type == Isolate::NOT_CAUGHT); | 2528 bool uncaught = (catch_type == Isolate::NOT_CAUGHT); |
2529 if (promise->IsJSObject()) { | 2529 if (promise->IsJSObject()) { |
2530 Handle<JSObject> jspromise = Handle<JSObject>::cast(promise); | 2530 Handle<JSObject> jspromise = Handle<JSObject>::cast(promise); |
2531 // Mark the promise as already having triggered a message. | 2531 // Mark the promise as already having triggered a message. |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3402 logger_->DebugEvent("Put", message.text()); | 3402 logger_->DebugEvent("Put", message.text()); |
3403 } | 3403 } |
3404 | 3404 |
3405 | 3405 |
3406 void LockingCommandMessageQueue::Clear() { | 3406 void LockingCommandMessageQueue::Clear() { |
3407 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3407 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
3408 queue_.Clear(); | 3408 queue_.Clear(); |
3409 } | 3409 } |
3410 | 3410 |
3411 } } // namespace v8::internal | 3411 } } // namespace v8::internal |
OLD | NEW |