Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: src/api.cc

Issue 1181053003: Version 4.3.61.28 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.3
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/v8-version.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698