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 #ifndef V8_SNAPSHOT_SNAPSHOT_H_ | 5 #ifndef V8_SNAPSHOT_SNAPSHOT_H_ |
6 #define V8_SNAPSHOT_SNAPSHOT_H_ | 6 #define V8_SNAPSHOT_SNAPSHOT_H_ |
7 | 7 |
8 #include "src/snapshot/partial-serializer.h" | 8 #include "src/snapshot/partial-serializer.h" |
9 #include "src/snapshot/startup-serializer.h" | 9 #include "src/snapshot/startup-serializer.h" |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 }; | 52 }; |
53 | 53 |
54 class Snapshot : public AllStatic { | 54 class Snapshot : public AllStatic { |
55 public: | 55 public: |
56 // Initialize the Isolate from the internal snapshot. Returns false if no | 56 // Initialize the Isolate from the internal snapshot. Returns false if no |
57 // snapshot could be found. | 57 // snapshot could be found. |
58 static bool Initialize(Isolate* isolate); | 58 static bool Initialize(Isolate* isolate); |
59 // Create a new context using the internal partial snapshot. | 59 // Create a new context using the internal partial snapshot. |
60 static MaybeHandle<Context> NewContextFromSnapshot( | 60 static MaybeHandle<Context> NewContextFromSnapshot( |
61 Isolate* isolate, Handle<JSGlobalProxy> global_proxy, | 61 Isolate* isolate, Handle<JSGlobalProxy> global_proxy, |
62 size_t context_index); | 62 size_t context_index, |
| 63 v8::DeserializeInternalFieldsCallback internal_fields_deserializer); |
63 | 64 |
64 static bool HaveASnapshotToStartFrom(Isolate* isolate); | 65 static bool HaveASnapshotToStartFrom(Isolate* isolate); |
65 | 66 |
66 static bool HasContextSnapshot(Isolate* isolate, size_t index); | 67 static bool HasContextSnapshot(Isolate* isolate, size_t index); |
67 | 68 |
68 static bool EmbedsScript(Isolate* isolate); | 69 static bool EmbedsScript(Isolate* isolate); |
69 | 70 |
70 // To be implemented by the snapshot source. | 71 // To be implemented by the snapshot source. |
71 static const v8::StartupData* DefaultSnapshotBlob(); | 72 static const v8::StartupData* DefaultSnapshotBlob(); |
72 | 73 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 }; | 111 }; |
111 | 112 |
112 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 113 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
113 void SetSnapshotFromFile(StartupData* snapshot_blob); | 114 void SetSnapshotFromFile(StartupData* snapshot_blob); |
114 #endif | 115 #endif |
115 | 116 |
116 } // namespace internal | 117 } // namespace internal |
117 } // namespace v8 | 118 } // namespace v8 |
118 | 119 |
119 #endif // V8_SNAPSHOT_SNAPSHOT_H_ | 120 #endif // V8_SNAPSHOT_SNAPSHOT_H_ |
OLD | NEW |