File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -890,12 +890,6 @@ class BinaryBuilder {
890890 _byteOffset = index.binaryOffsetForCanonicalNames;
891891 readLinkTable (component.root);
892892
893- // TODO(alexmarkov): reverse metadata mappings and read forwards
894- _byteOffset = index.binaryOffsetForStringTable; // Read backwards.
895- _readMetadataMappings (component, index.binaryOffsetForMetadataPayloads);
896-
897- _associateMetadata (component, _componentStartOffset);
898-
899893 _byteOffset = index.binaryOffsetForSourceTable;
900894 Map <Uri , Source > uriToSource = readUriToSource (readCoverage: true );
901895 _mergeUriToSource (component.uriToSource, uriToSource);
@@ -904,6 +898,14 @@ class BinaryBuilder {
904898 readConstantTable ();
905899 // We don't need the constant table index on the dart side.
906900
901+ // TODO(alexmarkov): reverse metadata mappings and read forwards
902+ // Ensure constant table is loaded before metadata is read as it may contain
903+ // references to the constant table.
904+ _byteOffset = index.binaryOffsetForStringTable; // Read backwards.
905+ _readMetadataMappings (component, index.binaryOffsetForMetadataPayloads);
906+
907+ _associateMetadata (component, _componentStartOffset);
908+
907909 int numberOfLibraries = index.libraryCount;
908910
909911 SubComponentView ? result;
You can’t perform that action at this time.
0 commit comments