| 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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 i::Handle<i::JSObject> js_debug | 844 i::Handle<i::JSObject> js_debug |
| 845 = i::Handle<i::JSObject>(debug_context->global_object()); | 845 = i::Handle<i::JSObject>(debug_context->global_object()); |
| 846 utility_context->Global()->Set(String::NewFromUtf8(isolate, "$debug"), | 846 utility_context->Global()->Set(String::NewFromUtf8(isolate, "$debug"), |
| 847 Utils::ToLocal(js_debug)); | 847 Utils::ToLocal(js_debug)); |
| 848 debug_context->set_security_token( | 848 debug_context->set_security_token( |
| 849 reinterpret_cast<i::Isolate*>(isolate)->heap()->undefined_value()); | 849 reinterpret_cast<i::Isolate*>(isolate)->heap()->undefined_value()); |
| 850 | 850 |
| 851 // Run the d8 shell utility script in the utility context | 851 // Run the d8 shell utility script in the utility context |
| 852 int source_index = i::NativesCollection<i::D8>::GetIndex("d8"); | 852 int source_index = i::NativesCollection<i::D8>::GetIndex("d8"); |
| 853 i::Vector<const char> shell_source = | 853 i::Vector<const char> shell_source = |
| 854 i::NativesCollection<i::D8>::GetRawScriptSource(source_index); | 854 i::NativesCollection<i::D8>::GetScriptSource(source_index); |
| 855 i::Vector<const char> shell_source_name = | 855 i::Vector<const char> shell_source_name = |
| 856 i::NativesCollection<i::D8>::GetScriptName(source_index); | 856 i::NativesCollection<i::D8>::GetScriptName(source_index); |
| 857 Handle<String> source = | 857 Handle<String> source = |
| 858 String::NewFromUtf8(isolate, shell_source.start(), String::kNormalString, | 858 String::NewFromUtf8(isolate, shell_source.start(), String::kNormalString, |
| 859 shell_source.length()); | 859 shell_source.length()); |
| 860 Handle<String> name = | 860 Handle<String> name = |
| 861 String::NewFromUtf8(isolate, shell_source_name.start(), | 861 String::NewFromUtf8(isolate, shell_source_name.start(), |
| 862 String::kNormalString, shell_source_name.length()); | 862 String::kNormalString, shell_source_name.length()); |
| 863 ScriptOrigin origin(name); | 863 ScriptOrigin origin(name); |
| 864 Handle<Script> script = Script::Compile(source, &origin); | 864 Handle<Script> script = Script::Compile(source, &origin); |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 } | 1722 } |
| 1723 | 1723 |
| 1724 } // namespace v8 | 1724 } // namespace v8 |
| 1725 | 1725 |
| 1726 | 1726 |
| 1727 #ifndef GOOGLE3 | 1727 #ifndef GOOGLE3 |
| 1728 int main(int argc, char* argv[]) { | 1728 int main(int argc, char* argv[]) { |
| 1729 return v8::Shell::Main(argc, argv); | 1729 return v8::Shell::Main(argc, argv); |
| 1730 } | 1730 } |
| 1731 #endif | 1731 #endif |
| OLD | NEW |