| 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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 return false; | 773 return false; |
| 774 } | 774 } |
| 775 | 775 |
| 776 // Find source and name for the requested script. | 776 // Find source and name for the requested script. |
| 777 Handle<String> source_code = | 777 Handle<String> source_code = |
| 778 Isolate::Current()->bootstrapper()->NativesSourceLookup(index); | 778 Isolate::Current()->bootstrapper()->NativesSourceLookup(index); |
| 779 Vector<const char> name = Natives::GetScriptName(index); | 779 Vector<const char> name = Natives::GetScriptName(index); |
| 780 Handle<String> script_name = FACTORY->NewStringFromAscii(name); | 780 Handle<String> script_name = FACTORY->NewStringFromAscii(name); |
| 781 | 781 |
| 782 // Compile the script. | 782 // Compile the script. |
| 783 bool allow_natives_syntax = FLAG_allow_natives_syntax; | |
| 784 FLAG_allow_natives_syntax = true; | |
| 785 Handle<SharedFunctionInfo> function_info; | 783 Handle<SharedFunctionInfo> function_info; |
| 786 function_info = Compiler::Compile(source_code, | 784 function_info = Compiler::Compile(source_code, |
| 787 script_name, | 785 script_name, |
| 788 0, 0, NULL, NULL, | 786 0, 0, NULL, NULL, |
| 789 Handle<String>::null(), | 787 Handle<String>::null(), |
| 790 NATIVES_CODE); | 788 NATIVES_CODE); |
| 791 FLAG_allow_natives_syntax = allow_natives_syntax; | |
| 792 | 789 |
| 793 // Silently ignore stack overflows during compilation. | 790 // Silently ignore stack overflows during compilation. |
| 794 if (function_info.is_null()) { | 791 if (function_info.is_null()) { |
| 795 ASSERT(Isolate::Current()->has_pending_exception()); | 792 ASSERT(Isolate::Current()->has_pending_exception()); |
| 796 Isolate::Current()->clear_pending_exception(); | 793 Isolate::Current()->clear_pending_exception(); |
| 797 return false; | 794 return false; |
| 798 } | 795 } |
| 799 | 796 |
| 800 // Execute the shared function in the debugger context. | 797 // Execute the shared function in the debugger context. |
| 801 Handle<Context> context = Isolate::Current()->global_context(); | 798 Handle<Context> context = Isolate::Current()->global_context(); |
| (...skipping 2363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3165 { | 3162 { |
| 3166 Locker locker; | 3163 Locker locker; |
| 3167 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3164 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
| 3168 } | 3165 } |
| 3169 } | 3166 } |
| 3170 } | 3167 } |
| 3171 | 3168 |
| 3172 #endif // ENABLE_DEBUGGER_SUPPORT | 3169 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3173 | 3170 |
| 3174 } } // namespace v8::internal | 3171 } } // namespace v8::internal |
| OLD | NEW |