mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 19:21:30 +00:00
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:
parent
61e109c652
commit
754e5f404c
|
@ -614,15 +614,6 @@ void KernelLoader::LoadNativeExtensionLibraries(
|
||||||
if (result.IsError()) {
|
if (result.IsError()) {
|
||||||
H.ReportError(Error::Cast(result), "library handler failed");
|
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();
|
potential_extension_libraries_ = GrowableObjectArray::null();
|
||||||
|
|
|
@ -13,7 +13,7 @@ class RandomArray {
|
||||||
static SendPort _port;
|
static SendPort _port;
|
||||||
|
|
||||||
Future<List<int>> randomArray(int seed, int length) {
|
Future<List<int>> randomArray(int seed, int length) {
|
||||||
var completer = new Completer<List<int>>();
|
var completer = new Completer();
|
||||||
var replyPort = new RawReceivePort();
|
var replyPort = new RawReceivePort();
|
||||||
var args = new List(3);
|
var args = new List(3);
|
||||||
args[0] = seed;
|
args[0] = seed;
|
||||||
|
|
|
@ -8,6 +8,9 @@ sample_extension/test/*: Skip # Issue 14705
|
||||||
[ $builder_tag == optimization_counter_threshold ]
|
[ $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.
|
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 ]
|
[ $compiler == precompiler ]
|
||||||
sample_extension/test/*: Skip # These tests attempt to spawn another script using the precompiled runtime.
|
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) ]
|
[ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
|
||||||
*: SkipByDesign # Deprecating all Dart1 modes of execution
|
*: SkipByDesign # Deprecating all Dart1 modes of execution
|
||||||
|
|
||||||
[ $compiler == app_jitk || $compiler == dartkb || $compiler == dartkp ]
|
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
|
||||||
sample_extension/test/sample_extension_app_snapshot_test: SkipByDesign
|
sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
|
||||||
sample_extension/test/sample_extension_test: SkipByDesign
|
sample_extension/test/sample_extension_test: RuntimeError
|
||||||
|
|
||||||
# Skip tests that use dart:io
|
# Skip tests that use dart:io
|
||||||
[ $runtime == d8 || $browser ]
|
[ $runtime == d8 || $browser ]
|
||||||
|
|
Loading…
Reference in a new issue