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

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

Issue 1411853003: Service isolate requests Observatory assets from embedder (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « runtime/vm/dart.cc ('k') | runtime/vm/service.h » ('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 (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 "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 const uint8_t* vm_isolate_snapshot, 1273 const uint8_t* vm_isolate_snapshot,
1274 const uint8_t* instructions_snapshot, 1274 const uint8_t* instructions_snapshot,
1275 Dart_IsolateCreateCallback create, 1275 Dart_IsolateCreateCallback create,
1276 Dart_IsolateInterruptCallback interrupt, 1276 Dart_IsolateInterruptCallback interrupt,
1277 Dart_IsolateUnhandledExceptionCallback unhandled, 1277 Dart_IsolateUnhandledExceptionCallback unhandled,
1278 Dart_IsolateShutdownCallback shutdown, 1278 Dart_IsolateShutdownCallback shutdown,
1279 Dart_FileOpenCallback file_open, 1279 Dart_FileOpenCallback file_open,
1280 Dart_FileReadCallback file_read, 1280 Dart_FileReadCallback file_read,
1281 Dart_FileWriteCallback file_write, 1281 Dart_FileWriteCallback file_write,
1282 Dart_FileCloseCallback file_close, 1282 Dart_FileCloseCallback file_close,
1283 Dart_EntropySource entropy_source) { 1283 Dart_EntropySource entropy_source,
1284 Dart_GetVMServiceAssetsArchive get_service_assets) {
1284 if ((instructions_snapshot != NULL) && !FLAG_precompilation) { 1285 if ((instructions_snapshot != NULL) && !FLAG_precompilation) {
1285 return strdup("Flag --precompilation was not specified."); 1286 return strdup("Flag --precompilation was not specified.");
1286 } 1287 }
1287 const char* err_msg = Dart::InitOnce(vm_isolate_snapshot, 1288 const char* err_msg = Dart::InitOnce(vm_isolate_snapshot,
1288 instructions_snapshot, 1289 instructions_snapshot,
1289 create, interrupt, unhandled, shutdown, 1290 create, interrupt, unhandled, shutdown,
1290 file_open, file_read, file_write, 1291 file_open, file_read, file_write,
1291 file_close, entropy_source); 1292 file_close, entropy_source,
1293 get_service_assets);
1292 if (err_msg != NULL) { 1294 if (err_msg != NULL) {
1293 return strdup(err_msg); 1295 return strdup(err_msg);
1294 } 1296 }
1295 return NULL; 1297 return NULL;
1296 } 1298 }
1297 1299
1298 1300
1299 DART_EXPORT char* Dart_Cleanup() { 1301 DART_EXPORT char* Dart_Cleanup() {
1300 CHECK_NO_ISOLATE(Isolate::Current()); 1302 CHECK_NO_ISOLATE(Isolate::Current());
1301 const char* err_msg = Dart::Cleanup(); 1303 const char* err_msg = Dart::Cleanup();
(...skipping 4768 matching lines...) Expand 10 before | Expand all | Expand 10 after
6070 ApiReallocate); 6072 ApiReallocate);
6071 writer.WriteFullSnapshot(); 6073 writer.WriteFullSnapshot();
6072 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); 6074 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
6073 *isolate_snapshot_size = writer.IsolateSnapshotSize(); 6075 *isolate_snapshot_size = writer.IsolateSnapshotSize();
6074 *instructions_snapshot_size = writer.InstructionsSnapshotSize(); 6076 *instructions_snapshot_size = writer.InstructionsSnapshotSize();
6075 6077
6076 return Api::Success(); 6078 return Api::Success();
6077 } 6079 }
6078 6080
6079 } // namespace dart 6081 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698