Skip to content

Commit

Permalink
Revert "[vm] Revert service isolate setup in main.cc"
Browse files Browse the repository at this point in the history
This reverts commit 0eb5dbf.

Reason for revert: the root cause of crashes is fixed, so
there is no need in the workaround anymore.

Change-Id: Ifc3b5027193c2d5db4a43f451996607b9558fe78
Reviewed-on: https://dart-review.googlesource.com/c/80540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
  • Loading branch information
alexmarkov authored and commit-bot@chromium.org committed Oct 22, 2018
1 parent b4fbf1a commit 74792f4
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions runtime/bin/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -482,25 +482,13 @@ static Dart_Isolate CreateAndSetupServiceIsolate(const char* script_uri,
// Set flag to load and retain the vmservice library.
ASSERT(flags != NULL);
flags->load_vmservice_library = true;

// If there is intention to use DFE, then we create the isolate
// from kernel only if we can.
const uint8_t* kernel_buffer = NULL;
intptr_t kernel_buffer_size = 0;
dfe.LoadPlatform(&kernel_buffer, &kernel_buffer_size);
if (kernel_buffer == NULL) {
dfe.application_kernel_buffer(&kernel_buffer, &kernel_buffer_size);
}

if (kernel_buffer != NULL) {
isolate = Dart_CreateIsolateFromKernel(script_uri, NULL, kernel_buffer,
kernel_buffer_size, flags,
isolate_data, error);
} else {
*error = strdup("Platform file not available to create service isolate.");
delete isolate_data;
return NULL;
}
const uint8_t* isolate_snapshot_data = core_isolate_snapshot_data;
const uint8_t* isolate_snapshot_instructions =
core_isolate_snapshot_instructions;
isolate = Dart_CreateIsolate(
script_uri, NULL, isolate_snapshot_data, isolate_snapshot_instructions,
app_isolate_shared_data, app_isolate_shared_instructions, flags,
isolate_data, error);
#endif // !defined(DART_PRECOMPILED_RUNTIME)
if (isolate == NULL) {
delete isolate_data;
Expand Down

0 comments on commit 74792f4

Please sign in to comment.