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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 | 676 |
677 // Find source and name for the requested script. | 677 // Find source and name for the requested script. |
678 Handle<String> source_code = Bootstrapper::NativesSourceLookup(index); | 678 Handle<String> source_code = Bootstrapper::NativesSourceLookup(index); |
679 Vector<const char> name = Natives::GetScriptName(index); | 679 Vector<const char> name = Natives::GetScriptName(index); |
680 Handle<String> script_name = Factory::NewStringFromAscii(name); | 680 Handle<String> script_name = Factory::NewStringFromAscii(name); |
681 | 681 |
682 // Compile the script. | 682 // Compile the script. |
683 bool allow_natives_syntax = FLAG_allow_natives_syntax; | 683 bool allow_natives_syntax = FLAG_allow_natives_syntax; |
684 FLAG_allow_natives_syntax = true; | 684 FLAG_allow_natives_syntax = true; |
685 Handle<JSFunction> boilerplate; | 685 Handle<JSFunction> boilerplate; |
686 boilerplate = Compiler::Compile(source_code, script_name, 0, 0, NULL, NULL); | 686 boilerplate = Compiler::Compile(source_code, script_name, 0, 0, NULL, NULL, |
| 687 Handle<String>::null()); |
687 FLAG_allow_natives_syntax = allow_natives_syntax; | 688 FLAG_allow_natives_syntax = allow_natives_syntax; |
688 | 689 |
689 // Silently ignore stack overflows during compilation. | 690 // Silently ignore stack overflows during compilation. |
690 if (boilerplate.is_null()) { | 691 if (boilerplate.is_null()) { |
691 ASSERT(Top::has_pending_exception()); | 692 ASSERT(Top::has_pending_exception()); |
692 Top::clear_pending_exception(); | 693 Top::clear_pending_exception(); |
693 return false; | 694 return false; |
694 } | 695 } |
695 | 696 |
696 // Execute the boilerplate function in the debugger context. | 697 // Execute the boilerplate function in the debugger context. |
(...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2787 { | 2788 { |
2788 Locker locker; | 2789 Locker locker; |
2789 Debugger::CallMessageDispatchHandler(); | 2790 Debugger::CallMessageDispatchHandler(); |
2790 } | 2791 } |
2791 } | 2792 } |
2792 } | 2793 } |
2793 | 2794 |
2794 #endif // ENABLE_DEBUGGER_SUPPORT | 2795 #endif // ENABLE_DEBUGGER_SUPPORT |
2795 | 2796 |
2796 } } // namespace v8::internal | 2797 } } // namespace v8::internal |
OLD | NEW |