| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 Handle<JSFunction> function = | 752 Handle<JSFunction> function = |
| 753 Factory::NewFunctionFromSharedFunctionInfo(function_info, context); | 753 Factory::NewFunctionFromSharedFunctionInfo(function_info, context); |
| 754 Handle<Object> result = | 754 Handle<Object> result = |
| 755 Execution::TryCall(function, Handle<Object>(context->global()), | 755 Execution::TryCall(function, Handle<Object>(context->global()), |
| 756 0, NULL, &caught_exception); | 756 0, NULL, &caught_exception); |
| 757 | 757 |
| 758 // Check for caught exceptions. | 758 // Check for caught exceptions. |
| 759 if (caught_exception) { | 759 if (caught_exception) { |
| 760 Handle<Object> message = MessageHandler::MakeMessageObject( | 760 Handle<Object> message = MessageHandler::MakeMessageObject( |
| 761 "error_loading_debugger", NULL, Vector<Handle<Object> >::empty(), | 761 "error_loading_debugger", NULL, Vector<Handle<Object> >::empty(), |
| 762 Handle<String>()); | 762 Handle<String>(), Handle<JSArray>()); |
| 763 MessageHandler::ReportMessage(NULL, message); | 763 MessageHandler::ReportMessage(NULL, message); |
| 764 return false; | 764 return false; |
| 765 } | 765 } |
| 766 | 766 |
| 767 // Mark this script as native and return successfully. | 767 // Mark this script as native and return successfully. |
| 768 Handle<Script> script(Script::cast(function->shared()->script())); | 768 Handle<Script> script(Script::cast(function->shared()->script())); |
| 769 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); | 769 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); |
| 770 return true; | 770 return true; |
| 771 } | 771 } |
| 772 | 772 |
| (...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2940 { | 2940 { |
| 2941 Locker locker; | 2941 Locker locker; |
| 2942 Debugger::CallMessageDispatchHandler(); | 2942 Debugger::CallMessageDispatchHandler(); |
| 2943 } | 2943 } |
| 2944 } | 2944 } |
| 2945 } | 2945 } |
| 2946 | 2946 |
| 2947 #endif // ENABLE_DEBUGGER_SUPPORT | 2947 #endif // ENABLE_DEBUGGER_SUPPORT |
| 2948 | 2948 |
| 2949 } } // namespace v8::internal | 2949 } } // namespace v8::internal |
| OLD | NEW |