Revert "[vm/extensions] Fix Loader::ReloadNativeExtensions(...)."

This reverts commit 4118d3c793.

Crashes on hot reload/rollback bots.

Original change's description:
> [vm/extensions] Fix Loader::ReloadNativeExtensions(...).
> 
> This method was not doing anything since the switch to Dart 2
> because extensions no longer were added as imports to the libraries
> which loaded them.
> 
> This is a commandeer of https://dart-review.googlesource.com/c/sdk/+/90240 with a bug fix.
> 
> Change-Id: Idfe2ec16ae714b5a31ed53332da6704248949915
> Reviewed-on: https://dart-review.googlesource.com/c/92180
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,sjindel@google.com

Change-Id: If8c8d6cf8ee2cb0a354601f94c609d3d7b5ddf03
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/92640
Reviewed-by: Samir Jindel <sjindel@google.com>
This commit is contained in:
Samir Jindel 2019-02-11 18:16:21 +00:00
parent 61e109c652
commit 754e5f404c
3 changed files with 7 additions and 13 deletions

View file

@ -614,15 +614,6 @@ void KernelLoader::LoadNativeExtensionLibraries(
if (result.IsError()) {
H.ReportError(Error::Cast(result), "library handler failed");
}
// Create a dummy library and add it as an import to the current library.
// This allows later to discover and reload this native extension, e.g.
// when running from an app-jit snapshot.
// See Loader::ReloadNativeExtensions(...) which relies on
// Dart_GetImportsOfScheme('dart-ext').
const auto& native_library = Library::Handle(Library::New(uri_path));
library.AddImport(Namespace::Handle(Namespace::New(
native_library, Array::null_array(), Array::null_array())));
}
}
potential_extension_libraries_ = GrowableObjectArray::null();

View file

@ -13,7 +13,7 @@ class RandomArray {
static SendPort _port;
Future<List<int>> randomArray(int seed, int length) {
var completer = new Completer<List<int>>();
var completer = new Completer();
var replyPort = new RawReceivePort();
var args = new List(3);
args[0] = seed;

View file

@ -8,6 +8,9 @@ sample_extension/test/*: Skip # Issue 14705
[ $builder_tag == optimization_counter_threshold ]
sample_extension/test/sample_extension_app_snapshot_test: SkipByDesign # This test is too slow for testing with low optimization counter threshold.
[ $compiler == app_jit ]
sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
[ $compiler == precompiler ]
sample_extension/test/*: Skip # These tests attempt to spawn another script using the precompiled runtime.
@ -23,9 +26,9 @@ sample_extension/test/sample_extension_app_snapshot_test: Pass, RuntimeError # I
[ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # Deprecating all Dart1 modes of execution
[ $compiler == app_jitk || $compiler == dartkb || $compiler == dartkp ]
sample_extension/test/sample_extension_app_snapshot_test: SkipByDesign
sample_extension/test/sample_extension_test: SkipByDesign
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
sample_extension/test/sample_extension_test: RuntimeError
# Skip tests that use dart:io
[ $runtime == d8 || $browser ]