OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium 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 #include "services/js/js_app_runner_delegate.h" | 5 #include "services/js/js_app_runner_delegate.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "gin/modules/console.h" | 8 #include "gin/modules/console.h" |
9 #include "mojo/edk/js/core.h" | 9 #include "mojo/edk/js/core.h" |
10 #include "mojo/edk/js/handle.h" | 10 #include "mojo/edk/js/handle.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 PathService::Get(base::DIR_EXE, &search_paths[1]); | 22 PathService::Get(base::DIR_EXE, &search_paths[1]); |
23 search_paths[1] = search_paths[1].AppendASCII("gen"); | 23 search_paths[1] = search_paths[1].AppendASCII("gen"); |
24 return search_paths; | 24 return search_paths; |
25 } | 25 } |
26 | 26 |
27 } // namespace | 27 } // namespace |
28 | 28 |
29 JSAppRunnerDelegate::JSAppRunnerDelegate() | 29 JSAppRunnerDelegate::JSAppRunnerDelegate() |
30 : ModuleRunnerDelegate(GetModuleSearchPaths()) { | 30 : ModuleRunnerDelegate(GetModuleSearchPaths()) { |
31 AddBuiltinModule(gin::Console::kModuleName, gin::Console::GetModule); | 31 AddBuiltinModule(gin::Console::kModuleName, gin::Console::GetModule); |
32 AddBuiltinModule(js::Core::kModuleName, js::Core::GetModule); | 32 AddBuiltinModule(Core::kModuleName, Core::GetModule); |
33 AddBuiltinModule(js::Support::kModuleName, js::Support::GetModule); | 33 AddBuiltinModule(Support::kModuleName, Support::GetModule); |
34 AddBuiltinModule(js::Threading::kModuleName, js::Threading::GetModule); | 34 AddBuiltinModule(Threading::kModuleName, Threading::GetModule); |
35 } | 35 } |
36 | 36 |
37 JSAppRunnerDelegate::~JSAppRunnerDelegate() { | 37 JSAppRunnerDelegate::~JSAppRunnerDelegate() { |
38 } | 38 } |
39 | 39 |
40 void JSAppRunnerDelegate::UnhandledException(gin::ShellRunner* runner, | 40 void JSAppRunnerDelegate::UnhandledException(gin::ShellRunner* runner, |
41 gin::TryCatch& try_catch) { | 41 gin::TryCatch& try_catch) { |
42 gin::ModuleRunnerDelegate::UnhandledException(runner, try_catch); | 42 gin::ModuleRunnerDelegate::UnhandledException(runner, try_catch); |
43 LOG(ERROR) << try_catch.GetStackTrace(); | 43 LOG(ERROR) << try_catch.GetStackTrace(); |
44 } | 44 } |
45 | 45 |
46 } // namespace mojo | 46 } // namespace mojo |
47 } // namespace js | 47 } // namespace js |
48 | 48 |
OLD | NEW |