Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed service isolate not being initialized correctly due to bad name #8251

Merged
merged 2 commits into from
Mar 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 14 additions & 21 deletions runtime/dart_isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,6 @@ bool DartIsolate::Shutdown() {
}

Dart_Isolate DartIsolate::DartCreateAndStartServiceIsolate(
const char* advisory_script_uri,
const char* advisory_script_entrypoint,
const char* package_root,
const char* package_config,
Dart_IsolateFlags* flags,
Expand Down Expand Up @@ -517,19 +515,16 @@ Dart_Isolate DartIsolate::DartCreateAndStartServiceIsolate(

std::weak_ptr<DartIsolate> weak_service_isolate =
DartIsolate::CreateRootIsolate(
vm.get(), // vm
vm->GetIsolateSnapshot(), // isolate snapshot
vm->GetSharedSnapshot(), // shared snapshot
null_task_runners, // task runners
nullptr, // window
{}, // snapshot delegate
{}, // IO Manager
advisory_script_uri == nullptr ? ""
: advisory_script_uri, // script uri
advisory_script_entrypoint == nullptr
? ""
: advisory_script_entrypoint, // script entrypoint
flags // flags
vm.get(), // vm
vm->GetIsolateSnapshot(), // isolate snapshot
vm->GetSharedSnapshot(), // shared snapshot
null_task_runners, // task runners
nullptr, // window
{}, // snapshot delegate
{}, // IO Manager
DART_VM_SERVICE_ISOLATE_NAME, // script uri
DART_VM_SERVICE_ISOLATE_NAME, // script entrypoint
flags // flags
);

std::shared_ptr<DartIsolate> service_isolate = weak_service_isolate.lock();
Expand Down Expand Up @@ -573,12 +568,10 @@ Dart_Isolate DartIsolate::DartIsolateCreateCallback(
// DART_VM_SERVICE_ISOLATE_NAME. In such cases, we just create the service
// isolate like normal but dont hold a reference to it at all. We also start
// this isolate since we will never again reference it from the engine.
return DartCreateAndStartServiceIsolate(advisory_script_uri, //
advisory_script_entrypoint, //
package_root, //
package_config, //
flags, //
error //
return DartCreateAndStartServiceIsolate(package_root, //
package_config, //
flags, //
error //
);
}

Expand Down
2 changes: 0 additions & 2 deletions runtime/dart_isolate.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ class DartIsolate : public UIDartState {
char** error);

static Dart_Isolate DartCreateAndStartServiceIsolate(
const char* advisory_script_uri,
const char* advisory_script_entrypoint,
const char* package_root,
const char* package_config,
Dart_IsolateFlags* flags,
Expand Down