Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3067)

Unified Diff: tests/compiler/dart2js/serialization/native_data_test.dart

Issue 2863073003: Access NativeData only through ClosedWorld (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/jsinterop/world_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/serialization/native_data_test.dart
diff --git a/tests/compiler/dart2js/serialization/native_data_test.dart b/tests/compiler/dart2js/serialization/native_data_test.dart
index e91b266053a8f90b4f643d5623be1d15f23be937..01d1c51b72d116497052e3ca52105b03a374141e 100644
--- a/tests/compiler/dart2js/serialization/native_data_test.dart
+++ b/tests/compiler/dart2js/serialization/native_data_test.dart
@@ -13,6 +13,7 @@ import 'package:compiler/src/js_backend/js_backend.dart';
import 'package:compiler/src/js_backend/native_data.dart';
import 'package:compiler/src/filenames.dart';
import 'package:compiler/src/serialization/equivalence.dart';
+import 'package:compiler/src/world.dart';
import '../memory_compiler.dart';
import 'helper.dart';
import 'test_helper.dart';
@@ -35,6 +36,7 @@ Future checkNativeData(Uri uri, {bool verbose: false}) async {
SerializationResult result = await serialize(uri);
Compiler compiler1 = result.compiler;
SerializedData serializedData = result.serializedData;
+ ClosedWorld closedWorld1 = compiler1.closeResolution().closedWorld;
print('------------------------------------------------------------------');
print('analyze deserialized: $uri');
@@ -44,13 +46,14 @@ Future checkNativeData(Uri uri, {bool verbose: false}) async {
resolutionInputs: serializedData.toUris(),
options: [Flags.analyzeAll]);
await compiler2.run(uri);
+ ClosedWorld closedWorld2 = compiler2.closeResolution().closedWorld;
JavaScriptBackend backend1 = compiler1.backend;
JavaScriptBackend backend2 = compiler2.backend;
NativeBasicDataImpl nativeBasicData1 = backend1.nativeBasicData;
NativeBasicDataImpl nativeBasicData2 = backend2.nativeBasicData;
- NativeDataImpl nativeData1 = backend1.nativeData;
- NativeDataImpl nativeData2 = backend2.nativeData;
+ NativeDataImpl nativeData1 = closedWorld1.nativeData;
+ NativeDataImpl nativeData2 = closedWorld2.nativeData;
checkMaps(
nativeData1.jsInteropLibraryNames,
« no previous file with comments | « tests/compiler/dart2js/jsinterop/world_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698