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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 2637193002: Support spawnUri in app snapshots. (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 #if defined(DEBUG) 1574 #if defined(DEBUG)
1575 I->heap()->CollectAllGarbage(); 1575 I->heap()->CollectAllGarbage();
1576 CheckFunctionTypesVisitor check_canonical(T); 1576 CheckFunctionTypesVisitor check_canonical(T);
1577 I->heap()->IterateObjects(&check_canonical); 1577 I->heap()->IterateObjects(&check_canonical);
1578 #endif // #if defined(DEBUG) 1578 #endif // #if defined(DEBUG)
1579 1579
1580 FullSnapshotWriter writer(Snapshot::kCore, vm_isolate_snapshot_buffer, 1580 FullSnapshotWriter writer(Snapshot::kCore, vm_isolate_snapshot_buffer,
1581 isolate_snapshot_buffer, ApiReallocate, 1581 isolate_snapshot_buffer, ApiReallocate,
1582 NULL /* instructions_writer */); 1582 NULL /* instructions_writer */);
1583 writer.WriteFullSnapshot(); 1583 writer.WriteFullSnapshot();
1584 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); 1584 if (vm_isolate_snapshot_buffer != NULL) {
1585 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
1586 }
1585 *isolate_snapshot_size = writer.IsolateSnapshotSize(); 1587 *isolate_snapshot_size = writer.IsolateSnapshotSize();
1586 return Api::Success(); 1588 return Api::Success();
1587 } 1589 }
1588 1590
1589 1591
1590 DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer, 1592 DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer,
1591 intptr_t* size) { 1593 intptr_t* size) {
1592 API_TIMELINE_DURATION; 1594 API_TIMELINE_DURATION;
1593 DARTSCOPE(Thread::Current()); 1595 DARTSCOPE(Thread::Current());
1594 Isolate* I = T->isolate(); 1596 Isolate* I = T->isolate();
(...skipping 5196 matching lines...) Expand 10 before | Expand all | Expand 10 after
6791 } 6793 }
6792 6794
6793 6795
6794 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6796 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6795 #ifndef PRODUCT 6797 #ifndef PRODUCT
6796 Profiler::DumpStackTrace(context); 6798 Profiler::DumpStackTrace(context);
6797 #endif 6799 #endif
6798 } 6800 }
6799 6801
6800 } // namespace dart 6802 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698