| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 i::Object* raw_context = *v8::Utils::OpenPersistent(context); | 372 i::Object* raw_context = *v8::Utils::OpenPersistent(context); |
| 373 context.Reset(); | 373 context.Reset(); |
| 374 | 374 |
| 375 i::SnapshotByteSink snapshot_sink; | 375 i::SnapshotByteSink snapshot_sink; |
| 376 i::StartupSerializer ser(internal_isolate, &snapshot_sink); | 376 i::StartupSerializer ser(internal_isolate, &snapshot_sink); |
| 377 ser.SerializeStrongReferences(); | 377 ser.SerializeStrongReferences(); |
| 378 | 378 |
| 379 i::SnapshotByteSink context_sink; | 379 i::SnapshotByteSink context_sink; |
| 380 i::PartialSerializer context_ser(internal_isolate, &ser, &context_sink); | 380 i::PartialSerializer context_ser(internal_isolate, &ser, &context_sink); |
| 381 context_ser.Serialize(&raw_context); | 381 context_ser.Serialize(&raw_context); |
| 382 ser.SerializeWeakReferencesAndDeferred(); | 382 ser.SerializeWeakReferences(); |
| 383 | 383 |
| 384 result = i::Snapshot::CreateSnapshotBlob(ser, context_ser, metadata); | 384 result = i::Snapshot::CreateSnapshotBlob(ser, context_ser, metadata); |
| 385 } | 385 } |
| 386 if (i::FLAG_profile_deserialization) { | 386 if (i::FLAG_profile_deserialization) { |
| 387 i::PrintF("Creating snapshot took %0.3f ms\n", | 387 i::PrintF("Creating snapshot took %0.3f ms\n", |
| 388 timer.Elapsed().InMillisecondsF()); | 388 timer.Elapsed().InMillisecondsF()); |
| 389 } | 389 } |
| 390 timer.Stop(); | 390 timer.Stop(); |
| 391 } | 391 } |
| 392 isolate->Dispose(); | 392 isolate->Dispose(); |
| (...skipping 7642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8035 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8035 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 8036 Address callback_address = | 8036 Address callback_address = |
| 8037 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8037 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8038 VMState<EXTERNAL> state(isolate); | 8038 VMState<EXTERNAL> state(isolate); |
| 8039 ExternalCallbackScope call_scope(isolate, callback_address); | 8039 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8040 callback(info); | 8040 callback(info); |
| 8041 } | 8041 } |
| 8042 | 8042 |
| 8043 | 8043 |
| 8044 } } // namespace v8::internal | 8044 } } // namespace v8::internal |
| OLD | NEW |