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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 MessageLocation computed_location; | 630 MessageLocation computed_location; |
631 isolate->ComputeLocation(&computed_location); | 631 isolate->ComputeLocation(&computed_location); |
632 Handle<JSMessageObject> 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(); | |
641 } | 640 } |
| 641 DCHECK(!maybe_exception.is_null()); |
642 return false; | 642 return false; |
643 } | 643 } |
644 | 644 |
645 // Mark this script as native and return successfully. | 645 // Mark this script as native and return successfully. |
646 Handle<Script> script(Script::cast(function->shared()->script())); | 646 Handle<Script> script(Script::cast(function->shared()->script())); |
647 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); | 647 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); |
648 return true; | 648 return true; |
649 } | 649 } |
650 | 650 |
651 | 651 |
(...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3364 } | 3364 } |
3365 | 3365 |
3366 | 3366 |
3367 void LockingCommandMessageQueue::Clear() { | 3367 void LockingCommandMessageQueue::Clear() { |
3368 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3368 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
3369 queue_.Clear(); | 3369 queue_.Clear(); |
3370 } | 3370 } |
3371 | 3371 |
3372 } // namespace internal | 3372 } // namespace internal |
3373 } // namespace v8 | 3373 } // namespace v8 |
OLD | NEW |