| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 | 779 |
| 780 // Check for caught exceptions. | 780 // Check for caught exceptions. |
| 781 if (caught_exception) { | 781 if (caught_exception) { |
| 782 ASSERT(!isolate->has_pending_exception()); | 782 ASSERT(!isolate->has_pending_exception()); |
| 783 MessageLocation computed_location; | 783 MessageLocation computed_location; |
| 784 isolate->ComputeLocation(&computed_location); | 784 isolate->ComputeLocation(&computed_location); |
| 785 Handle<Object> message = MessageHandler::MakeMessageObject( | 785 Handle<Object> message = MessageHandler::MakeMessageObject( |
| 786 "error_loading_debugger", &computed_location, | 786 "error_loading_debugger", &computed_location, |
| 787 Vector<Handle<Object> >::empty(), Handle<String>(), Handle<JSArray>()); | 787 Vector<Handle<Object> >::empty(), Handle<String>(), Handle<JSArray>()); |
| 788 ASSERT(!isolate->has_pending_exception()); | 788 ASSERT(!isolate->has_pending_exception()); |
| 789 isolate->set_pending_exception(*exception); | 789 if (!exception.is_null()) { |
| 790 MessageHandler::ReportMessage(Isolate::Current(), NULL, message); | 790 isolate->set_pending_exception(*exception); |
| 791 isolate->clear_pending_exception(); | 791 MessageHandler::ReportMessage(Isolate::Current(), NULL, message); |
| 792 isolate->clear_pending_exception(); |
| 793 } |
| 792 return false; | 794 return false; |
| 793 } | 795 } |
| 794 | 796 |
| 795 // Mark this script as native and return successfully. | 797 // Mark this script as native and return successfully. |
| 796 Handle<Script> script(Script::cast(function->shared()->script())); | 798 Handle<Script> script(Script::cast(function->shared()->script())); |
| 797 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); | 799 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); |
| 798 return true; | 800 return true; |
| 799 } | 801 } |
| 800 | 802 |
| 801 | 803 |
| (...skipping 2969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3771 { | 3773 { |
| 3772 Locker locker; | 3774 Locker locker; |
| 3773 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3775 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
| 3774 } | 3776 } |
| 3775 } | 3777 } |
| 3776 } | 3778 } |
| 3777 | 3779 |
| 3778 #endif // ENABLE_DEBUGGER_SUPPORT | 3780 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3779 | 3781 |
| 3780 } } // namespace v8::internal | 3782 } } // namespace v8::internal |
| OLD | NEW |