mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:06:59 +00:00
Revert "Allow gen_snapshot to create a core snapshot from a platform dill file."
This reverts commit 5ac157c572
.
Reason for revert:
After a roll of this into flutter engine and a roll of flutter engine
into flutter this broke flutter tests.
In particular it causes us to not load the entire application from the
dill file which makes us crash during lookup of embedder entrypoints,
or more specifically during lookup of "main" since
`I->object_store()->root_library()` is `null`.
Bug:
Change-Id: If3b05cba47ed20c2e9bfd48c89abd8200e0bf28b
Reviewed-on: https://dart-review.googlesource.com/23001
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This commit is contained in:
parent
d300b08e35
commit
d38c08d973
|
@ -1561,17 +1561,29 @@ int main(int argc, char** argv) {
|
|||
result = Dart_SetEnvironmentCallback(EnvironmentCallback);
|
||||
CHECK_RESULT(result);
|
||||
|
||||
if (kernel_program == NULL) {
|
||||
// Set up the library tag handler in such a manner that it will use the
|
||||
// URL mapping specified on the command line to load the libraries.
|
||||
result = Dart_SetLibraryTagHandler(CreateSnapshotLibraryTagHandler);
|
||||
CHECK_RESULT(result);
|
||||
|
||||
if (commandline_packages_file != NULL) {
|
||||
AddDependency(commandline_packages_file);
|
||||
}
|
||||
|
||||
if (kernel_program != NULL) {
|
||||
Dart_Handle resolved_uri = ResolveUriInWorkingDirectory(app_script_name);
|
||||
CHECK_RESULT(resolved_uri);
|
||||
Dart_Handle library =
|
||||
Dart_LoadScript(resolved_uri, Dart_Null(),
|
||||
reinterpret_cast<Dart_Handle>(kernel_program), 0, 0);
|
||||
CHECK_RESULT(library);
|
||||
} else {
|
||||
// Set up the library tag handler in such a manner that it will use the
|
||||
// URL mapping specified on the command line to load the libraries.
|
||||
result = Dart_SetLibraryTagHandler(CreateSnapshotLibraryTagHandler);
|
||||
CHECK_RESULT(result);
|
||||
}
|
||||
|
||||
if (commandline_packages_file != NULL) {
|
||||
AddDependency(commandline_packages_file);
|
||||
}
|
||||
|
||||
SetupStubNativeResolversForPrecompilation(entry_points);
|
||||
|
||||
SetupStubNativeResolvers();
|
||||
|
|
Loading…
Reference in a new issue