OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 // Used for building with external snapshots. | 5 // Used for building with external snapshots. |
6 | 6 |
7 #include "src/snapshot.h" | 7 #include "src/snapshot.h" |
8 | 8 |
9 #include "src/base/platform/mutex.h" | 9 #include "src/base/platform/mutex.h" |
10 #include "src/serialize.h" | 10 #include "src/serialize.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 external_startup_data_mutex.Pointer()); | 28 external_startup_data_mutex.Pointer()); |
29 DCHECK(snapshot_blob); | 29 DCHECK(snapshot_blob); |
30 DCHECK(snapshot_blob->data); | 30 DCHECK(snapshot_blob->data); |
31 DCHECK(snapshot_blob->raw_size > 0); | 31 DCHECK(snapshot_blob->raw_size > 0); |
32 DCHECK(!external_startup_blob.data); | 32 DCHECK(!external_startup_blob.data); |
33 DCHECK(Snapshot::SnapshotIsValid(snapshot_blob)); | 33 DCHECK(Snapshot::SnapshotIsValid(snapshot_blob)); |
34 external_startup_blob = *snapshot_blob; | 34 external_startup_blob = *snapshot_blob; |
35 } | 35 } |
36 | 36 |
37 | 37 |
38 const v8::StartupData Snapshot::SnapshotBlob() { | 38 const v8::StartupData* Snapshot::DefaultSnapshotBlob() { |
39 base::LockGuard<base::Mutex> lock_guard( | 39 base::LockGuard<base::Mutex> lock_guard( |
40 external_startup_data_mutex.Pointer()); | 40 external_startup_data_mutex.Pointer()); |
41 return external_startup_blob; | 41 return &external_startup_blob; |
42 } | 42 } |
43 } } // namespace v8::internal | 43 } } // namespace v8::internal |
OLD | NEW |