| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 // Defined when linking against shared lib on Windows. | 6 // Defined when linking against shared lib on Windows. |
| 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) | 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) |
| 8 #define V8_SHARED | 8 #define V8_SHARED |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 } | 1011 } |
| 1012 | 1012 |
| 1013 | 1013 |
| 1014 void Shell::InitializeDebugger(Isolate* isolate) { | 1014 void Shell::InitializeDebugger(Isolate* isolate) { |
| 1015 if (options.test_shell) return; | 1015 if (options.test_shell) return; |
| 1016 #ifndef V8_SHARED | 1016 #ifndef V8_SHARED |
| 1017 HandleScope scope(isolate); | 1017 HandleScope scope(isolate); |
| 1018 Handle<ObjectTemplate> global_template = CreateGlobalTemplate(isolate); | 1018 Handle<ObjectTemplate> global_template = CreateGlobalTemplate(isolate); |
| 1019 utility_context_.Reset(isolate, | 1019 utility_context_.Reset(isolate, |
| 1020 Context::New(isolate, NULL, global_template)); | 1020 Context::New(isolate, NULL, global_template)); |
| 1021 if (utility_context_.IsEmpty()) { |
| 1022 printf("Failed to initialize debugger\n"); |
| 1023 Shell::Exit(1); |
| 1024 } |
| 1021 #endif // !V8_SHARED | 1025 #endif // !V8_SHARED |
| 1022 } | 1026 } |
| 1023 | 1027 |
| 1024 | 1028 |
| 1025 Local<Context> Shell::CreateEvaluationContext(Isolate* isolate) { | 1029 Local<Context> Shell::CreateEvaluationContext(Isolate* isolate) { |
| 1026 #ifndef V8_SHARED | 1030 #ifndef V8_SHARED |
| 1027 // This needs to be a critical section since this is not thread-safe | 1031 // This needs to be a critical section since this is not thread-safe |
| 1028 base::LockGuard<base::Mutex> lock_guard(&context_mutex_); | 1032 base::LockGuard<base::Mutex> lock_guard(&context_mutex_); |
| 1029 #endif // !V8_SHARED | 1033 #endif // !V8_SHARED |
| 1030 // Initialize the global objects | 1034 // Initialize the global objects |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1751 } | 1755 } |
| 1752 | 1756 |
| 1753 } // namespace v8 | 1757 } // namespace v8 |
| 1754 | 1758 |
| 1755 | 1759 |
| 1756 #ifndef GOOGLE3 | 1760 #ifndef GOOGLE3 |
| 1757 int main(int argc, char* argv[]) { | 1761 int main(int argc, char* argv[]) { |
| 1758 return v8::Shell::Main(argc, argv); | 1762 return v8::Shell::Main(argc, argv); |
| 1759 } | 1763 } |
| 1760 #endif | 1764 #endif |
| OLD | NEW |