| 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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 v8::Handle<ObjectTemplate>(), | 848 v8::Handle<ObjectTemplate>(), |
| 849 NULL); | 849 NULL); |
| 850 | 850 |
| 851 // Use the debugger context. | 851 // Use the debugger context. |
| 852 SaveContext save(isolate); | 852 SaveContext save(isolate); |
| 853 isolate->set_context(*context); | 853 isolate->set_context(*context); |
| 854 | 854 |
| 855 // Expose the builtins object in the debugger context. | 855 // Expose the builtins object in the debugger context. |
| 856 Handle<String> key = FACTORY->LookupAsciiSymbol("builtins"); | 856 Handle<String> key = FACTORY->LookupAsciiSymbol("builtins"); |
| 857 Handle<GlobalObject> global = Handle<GlobalObject>(context->global()); | 857 Handle<GlobalObject> global = Handle<GlobalObject>(context->global()); |
| 858 SetProperty(global, key, Handle<Object>(global->builtins()), NONE); | 858 RETURN_IF_EMPTY_HANDLE_VALUE( |
| 859 isolate, |
| 860 SetProperty(global, key, Handle<Object>(global->builtins()), |
| 861 NONE, kNonStrictMode), |
| 862 false); |
| 859 | 863 |
| 860 // Compile the JavaScript for the debugger in the debugger context. | 864 // Compile the JavaScript for the debugger in the debugger context. |
| 861 isolate->debugger()->set_compiling_natives(true); | 865 isolate->debugger()->set_compiling_natives(true); |
| 862 bool caught_exception = | 866 bool caught_exception = |
| 863 !CompileDebuggerScript(Natives::GetIndex("mirror")) || | 867 !CompileDebuggerScript(Natives::GetIndex("mirror")) || |
| 864 !CompileDebuggerScript(Natives::GetIndex("debug")); | 868 !CompileDebuggerScript(Natives::GetIndex("debug")); |
| 865 | 869 |
| 866 if (FLAG_enable_liveedit) { | 870 if (FLAG_enable_liveedit) { |
| 867 caught_exception = caught_exception || | 871 caught_exception = caught_exception || |
| 868 !CompileDebuggerScript(Natives::GetIndex("liveedit")); | 872 !CompileDebuggerScript(Natives::GetIndex("liveedit")); |
| (...skipping 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3158 { | 3162 { |
| 3159 Locker locker; | 3163 Locker locker; |
| 3160 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3164 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
| 3161 } | 3165 } |
| 3162 } | 3166 } |
| 3163 } | 3167 } |
| 3164 | 3168 |
| 3165 #endif // ENABLE_DEBUGGER_SUPPORT | 3169 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3166 | 3170 |
| 3167 } } // namespace v8::internal | 3171 } } // namespace v8::internal |
| OLD | NEW |