| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/api.h" | 5 #include "src/api.h" |
| 6 | 6 |
| 7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
| 8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
| 9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
| 10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 i::Object* raw_context = *v8::Utils::OpenPersistent(context); | 362 i::Object* raw_context = *v8::Utils::OpenPersistent(context); |
| 363 context.Reset(); | 363 context.Reset(); |
| 364 | 364 |
| 365 i::SnapshotByteSink snapshot_sink; | 365 i::SnapshotByteSink snapshot_sink; |
| 366 i::StartupSerializer ser(internal_isolate, &snapshot_sink); | 366 i::StartupSerializer ser(internal_isolate, &snapshot_sink); |
| 367 ser.SerializeStrongReferences(); | 367 ser.SerializeStrongReferences(); |
| 368 | 368 |
| 369 i::SnapshotByteSink context_sink; | 369 i::SnapshotByteSink context_sink; |
| 370 i::PartialSerializer context_ser(internal_isolate, &ser, &context_sink); | 370 i::PartialSerializer context_ser(internal_isolate, &ser, &context_sink); |
| 371 context_ser.Serialize(&raw_context); | 371 context_ser.Serialize(&raw_context); |
| 372 ser.SerializeWeakReferences(); | 372 ser.SerializeWeakReferencesAndDeferred(); |
| 373 | 373 |
| 374 result = i::Snapshot::CreateSnapshotBlob(ser, context_ser, metadata); | 374 result = i::Snapshot::CreateSnapshotBlob(ser, context_ser, metadata); |
| 375 } | 375 } |
| 376 if (i::FLAG_profile_deserialization) { | 376 if (i::FLAG_profile_deserialization) { |
| 377 i::PrintF("Creating snapshot took %0.3f ms\n", | 377 i::PrintF("Creating snapshot took %0.3f ms\n", |
| 378 timer.Elapsed().InMillisecondsF()); | 378 timer.Elapsed().InMillisecondsF()); |
| 379 } | 379 } |
| 380 timer.Stop(); | 380 timer.Stop(); |
| 381 } | 381 } |
| 382 isolate->Dispose(); | 382 isolate->Dispose(); |
| (...skipping 7728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8111 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8111 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 8112 Address callback_address = | 8112 Address callback_address = |
| 8113 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8113 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8114 VMState<EXTERNAL> state(isolate); | 8114 VMState<EXTERNAL> state(isolate); |
| 8115 ExternalCallbackScope call_scope(isolate, callback_address); | 8115 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8116 callback(info); | 8116 callback(info); |
| 8117 } | 8117 } |
| 8118 | 8118 |
| 8119 | 8119 |
| 8120 } } // namespace v8::internal | 8120 } } // namespace v8::internal |
| OLD | NEW |