blob: e4ff07ffd84d042ced446afccce92452e3f07e60 [file] [log] [blame]
oth05c26fde2015-04-05 14:30:571// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "gin/v8_initializer.h"
6
avi90e658dd2015-12-21 07:16:197#include <stddef.h>
8#include <stdint.h>
9
mostynbc862da82016-04-03 15:54:3310#include <memory>
11
oth29c7ed92015-06-19 14:40:0012#include "base/debug/alias.h"
rmcilroy462e47e2016-06-24 20:45:0813#include "base/debug/crash_logging.h"
rmcilroyfe515ad2016-04-08 17:59:1014#include "base/feature_list.h"
oth05c26fde2015-04-05 14:30:5715#include "base/files/file.h"
16#include "base/files/file_path.h"
17#include "base/files/memory_mapped_file.h"
tobiasjsb20016272016-02-10 11:54:1218#include "base/lazy_instance.h"
oth05c26fde2015-04-05 14:30:5719#include "base/logging.h"
asvitkine30330812016-08-30 04:01:0820#include "base/metrics/histogram_macros.h"
Hitoshi Yoshidaf2f50de2017-08-22 13:23:5521#include "base/path_service.h"
oth05c26fde2015-04-05 14:30:5722#include "base/rand_util.h"
23#include "base/strings/sys_string_conversions.h"
rmcilroy542f61c2016-06-06 16:08:1924#include "base/sys_info.h"
oth575f7fb52015-05-08 17:35:0025#include "base/threading/platform_thread.h"
26#include "base/time/time.h"
Hitoshi Yoshidaf2f50de2017-08-22 13:23:5527#include "build/build_config.h"
oth05c26fde2015-04-05 14:30:5728
29#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
agrieve6f3002d2015-06-19 16:49:0630#if defined(OS_ANDROID)
31#include "base/android/apk_assets.h"
Hitoshi Yoshidaf2f50de2017-08-22 13:23:5532#elif defined(OS_MACOSX)
Max Morinf0d13c92017-08-17 10:04:5933#include "base/mac/foundation_util.h"
Hitoshi Yoshidaf2f50de2017-08-22 13:23:5534#endif
oth05c26fde2015-04-05 14:30:5735#endif // V8_USE_EXTERNAL_STARTUP_DATA
36
37namespace gin {
38
39namespace {
40
agrievefd2d44ab2015-06-19 04:33:0341// None of these globals are ever freed nor closed.
oth05c26fde2015-04-05 14:30:5742base::MemoryMappedFile* g_mapped_natives = nullptr;
43base::MemoryMappedFile* g_mapped_snapshot = nullptr;
Hitoshi Yoshidaf2f50de2017-08-22 13:23:5544base::MemoryMappedFile* g_mapped_v8_context_snapshot = nullptr;
oth05c26fde2015-04-05 14:30:5745
Hitoshi Yoshidaf2f50de2017-08-22 13:23:5546const char kV8ContextSnapshotFileName[] = "v8_context_snapshot.bin";
agrievefd2d44ab2015-06-19 04:33:0347
agrievefd2d44ab2015-06-19 04:33:0348// File handles intentionally never closed. Not using File here because its
49// Windows implementation guards against two instances owning the same
50// PlatformFile (which we allow since we know it is never freed).
Hitoshi Yoshidaf2f50de2017-08-22 13:23:5551using OpenedFileMap =
52 std::map<const char*,
53 std::pair<base::PlatformFile, base::MemoryMappedFile::Region>>;
54base::LazyInstance<OpenedFileMap>::Leaky g_opened_files =
tobiasjsb20016272016-02-10 11:54:1255 LAZY_INSTANCE_INITIALIZER;
56
Hitoshi Yoshidaf2f50de2017-08-22 13:23:5557#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
58
michaelbai020375882016-06-21 16:08:1559const char kNativesFileName[] = "natives_blob.bin";
60
michaelbai016306732015-11-03 19:48:0061#if defined(OS_ANDROID)
tobiasjsb20016272016-02-10 11:54:1262const char kSnapshotFileName64[] = "snapshot_blob_64.bin";
tobiasjsb20016272016-02-10 11:54:1263const char kSnapshotFileName32[] = "snapshot_blob_32.bin";
64
65#if defined(__LP64__)
tobiasjsb20016272016-02-10 11:54:1266#define kSnapshotFileName kSnapshotFileName64
michaelbai016306732015-11-03 19:48:0067#else
tobiasjsb20016272016-02-10 11:54:1268#define kSnapshotFileName kSnapshotFileName32
69#endif
michaelbai016306732015-11-03 19:48:0070
71#else // defined(OS_ANDROID)
rmcilroy54fab5e2015-04-06 21:14:5872const char kSnapshotFileName[] = "snapshot_blob.bin";
michaelbai016306732015-11-03 19:48:0073#endif // defined(OS_ANDROID)
rmcilroy54fab5e2015-04-06 21:14:5874
Hitoshi Yoshidaf2f50de2017-08-22 13:23:5575#endif // defined(V8_USE_EXTERNAL_STATUP_DATA)
76
erikcorryc94eff12015-06-08 11:29:1677void GetV8FilePath(const char* file_name, base::FilePath* path_out) {
rmcilroy54fab5e2015-04-06 21:14:5878#if !defined(OS_MACOSX)
79 base::FilePath data_path;
agrieve6f3002d2015-06-19 16:49:0680#if defined(OS_ANDROID)
81 // This is the path within the .apk.
82 data_path = base::FilePath(FILE_PATH_LITERAL("assets"));
83#elif defined(OS_POSIX)
84 PathService::Get(base::DIR_EXE, &data_path);
85#elif defined(OS_WIN)
86 PathService::Get(base::DIR_MODULE, &data_path);
87#endif
rmcilroy54fab5e2015-04-06 21:14:5888 DCHECK(!data_path.empty());
89
erikcorryc94eff12015-06-08 11:29:1690 *path_out = data_path.AppendASCII(file_name);
rmcilroy54fab5e2015-04-06 21:14:5891#else // !defined(OS_MACOSX)
92 base::ScopedCFTypeRef<CFStringRef> natives_file_name(
erikcorryc94eff12015-06-08 11:29:1693 base::SysUTF8ToCFStringRef(file_name));
94 *path_out = base::mac::PathForFrameworkBundleResource(natives_file_name);
rmcilroy54fab5e2015-04-06 21:14:5895#endif // !defined(OS_MACOSX)
96}
97
Hitoshi Yoshidaf2f50de2017-08-22 13:23:5598bool MapV8File(base::PlatformFile platform_file,
99 base::MemoryMappedFile::Region region,
100 base::MemoryMappedFile** mmapped_file_out) {
erikcorryc94eff12015-06-08 11:29:16101 DCHECK(*mmapped_file_out == NULL);
mostynbc862da82016-04-03 15:54:33102 std::unique_ptr<base::MemoryMappedFile> mmapped_file(
103 new base::MemoryMappedFile());
agrievefd2d44ab2015-06-19 04:33:03104 if (mmapped_file->Initialize(base::File(platform_file), region)) {
105 *mmapped_file_out = mmapped_file.release();
106 return true;
oth05c26fde2015-04-05 14:30:57107 }
agrievefd2d44ab2015-06-19 04:33:03108 return false;
oth05c26fde2015-04-05 14:30:57109}
110
agrievefd2d44ab2015-06-19 04:33:03111base::PlatformFile OpenV8File(const char* file_name,
112 base::MemoryMappedFile::Region* region_out) {
oth575f7fb52015-05-08 17:35:00113 // Re-try logic here is motivated by http://crbug.com/479537
114 // for A/V on Windows (https://support.microsoft.com/en-us/kb/316609).
115
116 // These match tools/metrics/histograms.xml
117 enum OpenV8FileResult {
118 OPENED = 0,
119 OPENED_RETRY,
120 FAILED_IN_USE,
121 FAILED_OTHER,
122 MAX_VALUE
123 };
agrievefd2d44ab2015-06-19 04:33:03124 base::FilePath path;
125 GetV8FilePath(file_name, &path);
126
agrieve6f3002d2015-06-19 16:49:06127#if defined(OS_ANDROID)
128 base::File file(base::android::OpenApkAsset(path.value(), region_out));
129 OpenV8FileResult result = file.IsValid() ? OpenV8FileResult::OPENED
130 : OpenV8FileResult::FAILED_OTHER;
131#else
132 // Re-try logic here is motivated by http://crbug.com/479537
133 // for A/V on Windows (https://support.microsoft.com/en-us/kb/316609).
134 const int kMaxOpenAttempts = 5;
135 const int kOpenRetryDelayMillis = 250;
136
oth575f7fb52015-05-08 17:35:00137 OpenV8FileResult result = OpenV8FileResult::FAILED_IN_USE;
agrievefd2d44ab2015-06-19 04:33:03138 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
139 base::File file;
oth575f7fb52015-05-08 17:35:00140 for (int attempt = 0; attempt < kMaxOpenAttempts; attempt++) {
141 file.Initialize(path, flags);
142 if (file.IsValid()) {
agrievefd2d44ab2015-06-19 04:33:03143 *region_out = base::MemoryMappedFile::Region::kWholeFile;
oth575f7fb52015-05-08 17:35:00144 if (attempt == 0) {
145 result = OpenV8FileResult::OPENED;
146 break;
147 } else {
148 result = OpenV8FileResult::OPENED_RETRY;
149 break;
150 }
151 } else if (file.error_details() != base::File::FILE_ERROR_IN_USE) {
152 result = OpenV8FileResult::FAILED_OTHER;
oth29c7ed92015-06-19 14:40:00153#ifdef OS_WIN
154 // TODO(oth): temporary diagnostics for http://crbug.com/479537
155 std::string narrow(kNativesFileName);
156 base::FilePath::StringType nativesBlob(narrow.begin(), narrow.end());
157 if (path.BaseName().value() == nativesBlob) {
158 base::File::Error file_error = file.error_details();
159 base::debug::Alias(&file_error);
160 LOG(FATAL) << "Failed to open V8 file '" << path.value()
161 << "' (reason: " << file.error_details() << ")";
162 }
163#endif // OS_WIN
oth575f7fb52015-05-08 17:35:00164 break;
165 } else if (kMaxOpenAttempts - 1 != attempt) {
166 base::PlatformThread::Sleep(
167 base::TimeDelta::FromMilliseconds(kOpenRetryDelayMillis));
168 }
169 }
agrieve6f3002d2015-06-19 16:49:06170#endif // defined(OS_ANDROID)
oth575f7fb52015-05-08 17:35:00171
172 UMA_HISTOGRAM_ENUMERATION("V8.Initializer.OpenV8File.Result",
173 result,
174 OpenV8FileResult::MAX_VALUE);
agrievefd2d44ab2015-06-19 04:33:03175 return file.TakePlatformFile();
176}
oth575f7fb52015-05-08 17:35:00177
Hitoshi Yoshida129ff2b2017-08-24 02:19:10178OpenedFileMap::mapped_type& GetOpenedFile(const char* filename) {
179 OpenedFileMap& opened_files(g_opened_files.Get());
Jeremy Roman6a3b3d42017-08-24 17:13:51180 auto result = opened_files.emplace(filename, OpenedFileMap::mapped_type());
181 OpenedFileMap::mapped_type& opened_file = result.first->second;
182 bool is_new_file = result.second;
Hitoshi Yoshida129ff2b2017-08-24 02:19:10183
Jeremy Roman6a3b3d42017-08-24 17:13:51184 // If we have no cache, try to open it and cache the result.
185 if (is_new_file)
186 opened_file.first = OpenV8File(filename, &opened_file.second);
187
188 return opened_file;
oth575f7fb52015-05-08 17:35:00189}
190
rmcilroy54fab5e2015-04-06 21:14:58191bool GenerateEntropy(unsigned char* buffer, size_t amount) {
192 base::RandBytes(buffer, amount);
193 return true;
194}
195
erikcorryc94eff12015-06-08 11:29:16196enum LoadV8FileResult {
197 V8_LOAD_SUCCESS = 0,
198 V8_LOAD_FAILED_OPEN,
199 V8_LOAD_FAILED_MAP,
jcivellidbe3dec2017-02-07 16:58:23200 V8_LOAD_FAILED_VERIFY, // Deprecated.
erikcorryc94eff12015-06-08 11:29:16201 V8_LOAD_MAX_VALUE
202};
oth575f7fb52015-05-08 17:35:00203
Hitoshi Yoshidaf2f50de2017-08-22 13:23:55204LoadV8FileResult MapOpenedFile(const OpenedFileMap::mapped_type& file_region,
205 base::MemoryMappedFile** mmapped_file_out) {
rockot5d4213ff2016-05-25 19:07:10206 if (file_region.first == base::kInvalidPlatformFile)
erikcorryc94eff12015-06-08 11:29:16207 return V8_LOAD_FAILED_OPEN;
tobiasjsb20016272016-02-10 11:54:12208 if (!MapV8File(file_region.first, file_region.second, mmapped_file_out))
erikcorryc94eff12015-06-08 11:29:16209 return V8_LOAD_FAILED_MAP;
erikcorryc94eff12015-06-08 11:29:16210 return V8_LOAD_SUCCESS;
oth05c26fde2015-04-05 14:30:57211}
212
Hitoshi Yoshida129ff2b2017-08-24 02:19:10213void GetMappedFileData(base::MemoryMappedFile* mapped_file,
Hitoshi Yoshidad88a223e2017-09-10 05:55:25214 v8::StartupData* data) {
Hitoshi Yoshida129ff2b2017-08-24 02:19:10215 if (mapped_file) {
Hitoshi Yoshidad88a223e2017-09-10 05:55:25216 data->data = reinterpret_cast<const char*>(mapped_file->data());
217 data->raw_size = static_cast<int>(mapped_file->length());
Hitoshi Yoshida129ff2b2017-08-24 02:19:10218 } else {
Hitoshi Yoshidad88a223e2017-09-10 05:55:25219 data->data = nullptr;
220 data->raw_size = 0;
Hitoshi Yoshida129ff2b2017-08-24 02:19:10221 }
222}
223
jcivellidbe3dec2017-02-07 16:58:23224} // namespace
225
Hitoshi Yoshidaf2f50de2017-08-22 13:23:55226#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
227
oth05c26fde2015-04-05 14:30:57228// static
erikcorryc94eff12015-06-08 11:29:16229void V8Initializer::LoadV8Snapshot() {
230 if (g_mapped_snapshot)
231 return;
232
jcivellidbe3dec2017-02-07 16:58:23233 LoadV8FileResult result = MapOpenedFile(GetOpenedFile(kSnapshotFileName),
234 &g_mapped_snapshot);
agrievefd2d44ab2015-06-19 04:33:03235 // V8 can't start up without the source of the natives, but it can
236 // start up (slower) without the snapshot.
erikcorryc94eff12015-06-08 11:29:16237 UMA_HISTOGRAM_ENUMERATION("V8.Initializer.LoadV8Snapshot.Result", result,
238 V8_LOAD_MAX_VALUE);
239}
240
241void V8Initializer::LoadV8Natives() {
242 if (g_mapped_natives)
243 return;
244
jcivellidbe3dec2017-02-07 16:58:23245 LoadV8FileResult result = MapOpenedFile(GetOpenedFile(kNativesFileName),
246 &g_mapped_natives);
erikcorryc94eff12015-06-08 11:29:16247 if (result != V8_LOAD_SUCCESS) {
248 LOG(FATAL) << "Couldn't mmap v8 natives data file, status code is "
249 << static_cast<int>(result);
250 }
251}
252
253// static
254void V8Initializer::LoadV8SnapshotFromFD(base::PlatformFile snapshot_pf,
avi90e658dd2015-12-21 07:16:19255 int64_t snapshot_offset,
256 int64_t snapshot_size) {
erikcorryc94eff12015-06-08 11:29:16257 if (g_mapped_snapshot)
258 return;
259
rockot5d4213ff2016-05-25 19:07:10260 if (snapshot_pf == base::kInvalidPlatformFile)
erikcorryc94eff12015-06-08 11:29:16261 return;
262
263 base::MemoryMappedFile::Region snapshot_region =
264 base::MemoryMappedFile::Region::kWholeFile;
265 if (snapshot_size != 0 || snapshot_offset != 0) {
agrievefd2d44ab2015-06-19 04:33:03266 snapshot_region.offset = snapshot_offset;
267 snapshot_region.size = snapshot_size;
erikcorryc94eff12015-06-08 11:29:16268 }
269
270 LoadV8FileResult result = V8_LOAD_SUCCESS;
agrievefd2d44ab2015-06-19 04:33:03271 if (!MapV8File(snapshot_pf, snapshot_region, &g_mapped_snapshot))
erikcorryc94eff12015-06-08 11:29:16272 result = V8_LOAD_FAILED_MAP;
mnaganovd6920a62015-08-25 17:20:31273 if (result == V8_LOAD_SUCCESS) {
tobiasjsb20016272016-02-10 11:54:12274 g_opened_files.Get()[kSnapshotFileName] =
275 std::make_pair(snapshot_pf, snapshot_region);
mnaganovd6920a62015-08-25 17:20:31276 }
erikcorryc94eff12015-06-08 11:29:16277 UMA_HISTOGRAM_ENUMERATION("V8.Initializer.LoadV8Snapshot.Result", result,
278 V8_LOAD_MAX_VALUE);
279}
280
281// static
282void V8Initializer::LoadV8NativesFromFD(base::PlatformFile natives_pf,
avi90e658dd2015-12-21 07:16:19283 int64_t natives_offset,
284 int64_t natives_size) {
erikcorryc94eff12015-06-08 11:29:16285 if (g_mapped_natives)
286 return;
287
rockot5d4213ff2016-05-25 19:07:10288 CHECK_NE(natives_pf, base::kInvalidPlatformFile);
oth05c26fde2015-04-05 14:30:57289
290 base::MemoryMappedFile::Region natives_region =
291 base::MemoryMappedFile::Region::kWholeFile;
292 if (natives_size != 0 || natives_offset != 0) {
agrievefd2d44ab2015-06-19 04:33:03293 natives_region.offset = natives_offset;
294 natives_region.size = natives_size;
oth05c26fde2015-04-05 14:30:57295 }
296
agrievefd2d44ab2015-06-19 04:33:03297 if (!MapV8File(natives_pf, natives_region, &g_mapped_natives)) {
erikcorryc94eff12015-06-08 11:29:16298 LOG(FATAL) << "Couldn't mmap v8 natives data file";
oth05c26fde2015-04-05 14:30:57299 }
tobiasjsb20016272016-02-10 11:54:12300 g_opened_files.Get()[kNativesFileName] =
301 std::make_pair(natives_pf, natives_region);
oth05c26fde2015-04-05 14:30:57302}
303
tobiasjsb20016272016-02-10 11:54:12304#if defined(OS_ANDROID)
305// static
michaelbai020375882016-06-21 16:08:15306base::FilePath V8Initializer::GetNativesFilePath() {
mrunal.kapadeded427a2016-04-26 00:10:44307 base::FilePath path;
michaelbai020375882016-06-21 16:08:15308 GetV8FilePath(kNativesFileName, &path);
mrunal.kapadeded427a2016-04-26 00:10:44309 return path;
310}
311
312// static
313base::FilePath V8Initializer::GetSnapshotFilePath(bool abi_32_bit) {
314 base::FilePath path;
315 GetV8FilePath(abi_32_bit ? kSnapshotFileName32 : kSnapshotFileName64, &path);
316 return path;
317}
tobiasjsb20016272016-02-10 11:54:12318#endif // defined(OS_ANDROID)
agrievefd2d44ab2015-06-19 04:33:03319#endif // defined(V8_USE_EXTERNAL_STARTUP_DATA)
oth05c26fde2015-04-05 14:30:57320
321// static
yhirano93150242015-12-07 12:28:33322void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
323 IsolateHolder::V8ExtrasMode v8_extras_mode) {
oth05c26fde2015-04-05 14:30:57324 static bool v8_is_initialized = false;
325 if (v8_is_initialized)
326 return;
327
328 v8::V8::InitializePlatform(V8Platform::Get());
oth05c26fde2015-04-05 14:30:57329
yhirano93150242015-12-07 12:28:33330 if (IsolateHolder::kStrictMode == mode) {
oth05c26fde2015-04-05 14:30:57331 static const char use_strict[] = "--use_strict";
332 v8::V8::SetFlagsFromString(use_strict, sizeof(use_strict) - 1);
333 }
yhirano93150242015-12-07 12:28:33334 if (IsolateHolder::kStableAndExperimentalV8Extras == v8_extras_mode) {
335 static const char flag[] = "--experimental_extras";
336 v8::V8::SetFlagsFromString(flag, sizeof(flag) - 1);
337 }
oth05c26fde2015-04-05 14:30:57338
339#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
340 v8::StartupData natives;
341 natives.data = reinterpret_cast<const char*>(g_mapped_natives->data());
342 natives.raw_size = static_cast<int>(g_mapped_natives->length());
343 v8::V8::SetNativesDataBlob(&natives);
344
Hitoshi Yoshidaf2f50de2017-08-22 13:23:55345 if (g_mapped_snapshot) {
erikcorryc94eff12015-06-08 11:29:16346 v8::StartupData snapshot;
347 snapshot.data = reinterpret_cast<const char*>(g_mapped_snapshot->data());
348 snapshot.raw_size = static_cast<int>(g_mapped_snapshot->length());
349 v8::V8::SetSnapshotDataBlob(&snapshot);
350 }
oth05c26fde2015-04-05 14:30:57351#endif // V8_USE_EXTERNAL_STARTUP_DATA
352
353 v8::V8::SetEntropySource(&GenerateEntropy);
354 v8::V8::Initialize();
355
356 v8_is_initialized = true;
357}
358
359// static
Hitoshi Yoshidad88a223e2017-09-10 05:55:25360void V8Initializer::GetV8ExternalSnapshotData(v8::StartupData* natives,
361 v8::StartupData* snapshot) {
362 GetMappedFileData(g_mapped_natives, natives);
363 GetMappedFileData(g_mapped_snapshot, snapshot);
364}
365
366// static
oth05c26fde2015-04-05 14:30:57367void V8Initializer::GetV8ExternalSnapshotData(const char** natives_data_out,
368 int* natives_size_out,
369 const char** snapshot_data_out,
370 int* snapshot_size_out) {
Hitoshi Yoshidad88a223e2017-09-10 05:55:25371 v8::StartupData natives;
372 v8::StartupData snapshot;
373 GetV8ExternalSnapshotData(&natives, &snapshot);
374 *natives_data_out = natives.data;
375 *natives_size_out = natives.raw_size;
376 *snapshot_data_out = snapshot.data;
377 *snapshot_size_out = snapshot.raw_size;
oth05c26fde2015-04-05 14:30:57378}
379
Hitoshi Yoshidaf2f50de2017-08-22 13:23:55380// static
381void V8Initializer::LoadV8ContextSnapshot() {
382 if (g_mapped_v8_context_snapshot)
383 return;
384
Hitoshi Yoshidaf2f50de2017-08-22 13:23:55385 MapOpenedFile(GetOpenedFile(kV8ContextSnapshotFileName),
386 &g_mapped_v8_context_snapshot);
387
388 // TODO(peria): Check if the snapshot file is loaded successfully.
389}
390
391// static
392void V8Initializer::LoadV8ContextSnapshotFromFD(base::PlatformFile snapshot_pf,
393 int64_t snapshot_offset,
394 int64_t snapshot_size) {
395 if (g_mapped_v8_context_snapshot)
396 return;
397 CHECK_NE(base::kInvalidPlatformFile, snapshot_pf);
398
399 base::MemoryMappedFile::Region snapshot_region =
400 base::MemoryMappedFile::Region::kWholeFile;
401 if (snapshot_size != 0 || snapshot_offset != 0) {
402 snapshot_region.offset = snapshot_offset;
403 snapshot_region.size = snapshot_size;
404 }
405
406 if (MapV8File(snapshot_pf, snapshot_region, &g_mapped_v8_context_snapshot)) {
407 g_opened_files.Get()[kV8ContextSnapshotFileName] =
408 std::make_pair(snapshot_pf, snapshot_region);
409 }
410}
411
412// static
Hitoshi Yoshidad88a223e2017-09-10 05:55:25413void V8Initializer::GetV8ContextSnapshotData(v8::StartupData* snapshot) {
414 GetMappedFileData(g_mapped_v8_context_snapshot, snapshot);
Hitoshi Yoshidaf2f50de2017-08-22 13:23:55415}
416
oth05c26fde2015-04-05 14:30:57417} // namespace gin