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

Side by Side Diff: src/debug.cc

Issue 1157563005: Do not eagerly convert exception to string when creating a message object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: small change Created 5 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
« no previous file with comments | « no previous file | src/isolate.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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 622
623 MaybeHandle<Object> maybe_exception; 623 MaybeHandle<Object> maybe_exception;
624 MaybeHandle<Object> result = Execution::TryCall( 624 MaybeHandle<Object> result = Execution::TryCall(
625 function, handle(context->global_proxy()), 0, NULL, &maybe_exception); 625 function, handle(context->global_proxy()), 0, NULL, &maybe_exception);
626 626
627 // Check for caught exceptions. 627 // Check for caught exceptions.
628 if (result.is_null()) { 628 if (result.is_null()) {
629 DCHECK(!isolate->has_pending_exception()); 629 DCHECK(!isolate->has_pending_exception());
630 MessageLocation computed_location; 630 MessageLocation computed_location;
631 isolate->ComputeLocation(&computed_location); 631 isolate->ComputeLocation(&computed_location);
632 Handle<Object> message = MessageHandler::MakeMessageObject( 632 Handle<JSMessageObject> message = MessageHandler::MakeMessageObject(
633 isolate, MessageTemplate::kDebuggerLoading, &computed_location, 633 isolate, MessageTemplate::kDebuggerLoading, &computed_location,
634 isolate->factory()->undefined_value(), Handle<JSArray>()); 634 isolate->factory()->undefined_value(), Handle<JSArray>());
635 DCHECK(!isolate->has_pending_exception()); 635 DCHECK(!isolate->has_pending_exception());
636 Handle<Object> exception; 636 Handle<Object> exception;
637 if (maybe_exception.ToHandle(&exception)) { 637 if (maybe_exception.ToHandle(&exception)) {
638 isolate->set_pending_exception(*exception); 638 isolate->set_pending_exception(*exception);
639 MessageHandler::ReportMessage(isolate, NULL, message); 639 MessageHandler::ReportMessage(isolate, NULL, message);
640 isolate->clear_pending_exception(); 640 isolate->clear_pending_exception();
641 } 641 }
642 return false; 642 return false;
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after
3362 logger_->DebugEvent("Put", message.text()); 3362 logger_->DebugEvent("Put", message.text());
3363 } 3363 }
3364 3364
3365 3365
3366 void LockingCommandMessageQueue::Clear() { 3366 void LockingCommandMessageQueue::Clear() {
3367 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3367 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3368 queue_.Clear(); 3368 queue_.Clear();
3369 } 3369 }
3370 3370
3371 } } // namespace v8::internal 3371 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698