OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include "src/startup-data-util.h" | 5 #include "src/startup-data-util.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "src/base/file-utils.h" | 10 #include "src/base/file-utils.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 79 } |
80 | 80 |
81 } // namespace | 81 } // namespace |
82 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 82 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
83 | 83 |
84 | 84 |
85 void InitializeExternalStartupData(const char* directory_path) { | 85 void InitializeExternalStartupData(const char* directory_path) { |
86 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 86 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
87 char* natives; | 87 char* natives; |
88 char* snapshot; | 88 char* snapshot; |
89 LoadFromFiles(RelativePath(&natives, directory_path, "natives_blob.bin"), | 89 LoadFromFiles( |
90 RelativePath(&snapshot, directory_path, "snapshot_blob.bin")); | 90 base::RelativePath(&natives, directory_path, "natives_blob.bin"), |
| 91 base::RelativePath(&snapshot, directory_path, "snapshot_blob.bin")); |
91 free(natives); | 92 free(natives); |
92 free(snapshot); | 93 free(snapshot); |
93 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 94 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
94 } | 95 } |
95 | 96 |
96 | 97 |
97 void InitializeExternalStartupData(const char* natives_blob, | 98 void InitializeExternalStartupData(const char* natives_blob, |
98 const char* snapshot_blob) { | 99 const char* snapshot_blob) { |
99 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 100 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
100 LoadFromFiles(natives_blob, snapshot_blob); | 101 LoadFromFiles(natives_blob, snapshot_blob); |
101 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 102 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
102 } | 103 } |
103 | 104 |
104 } // namespace internal | 105 } // namespace internal |
105 } // namespace v8 | 106 } // namespace v8 |
OLD | NEW |