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

Side by Side Diff: src/debug.cc

Issue 1126043004: Migrate error messages, part 10. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed and rebased Created 5 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
« no previous file with comments | « src/builtins.cc ('k') | src/elements.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 "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 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 isolate_->thread_local_top()->scheduled_exception_ = *scheduled_exception; 2500 isolate_->thread_local_top()->scheduled_exception_ = *scheduled_exception;
2501 } 2501 }
2502 } 2502 }
2503 2503
2504 2504
2505 void Debug::OnPromiseReject(Handle<JSObject> promise, Handle<Object> value) { 2505 void Debug::OnPromiseReject(Handle<JSObject> promise, Handle<Object> value) {
2506 if (in_debug_scope() || ignore_events()) return; 2506 if (in_debug_scope() || ignore_events()) return;
2507 HandleScope scope(isolate_); 2507 HandleScope scope(isolate_);
2508 // Check whether the promise has been marked as having triggered a message. 2508 // Check whether the promise has been marked as having triggered a message.
2509 Handle<Symbol> key = isolate_->factory()->promise_debug_marker_symbol(); 2509 Handle<Symbol> key = isolate_->factory()->promise_debug_marker_symbol();
2510 if (JSObject::GetDataProperty(promise, key)->IsUndefined()) { 2510 if (JSReceiver::GetDataProperty(promise, key)->IsUndefined()) {
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 JSReceiver::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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
3400 logger_->DebugEvent("Put", message.text()); 3400 logger_->DebugEvent("Put", message.text());
3401 } 3401 }
3402 3402
3403 3403
3404 void LockingCommandMessageQueue::Clear() { 3404 void LockingCommandMessageQueue::Clear() {
3405 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3405 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3406 queue_.Clear(); 3406 queue_.Clear();
3407 } 3407 }
3408 3408
3409 } } // namespace v8::internal 3409 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698