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

Unified Diff: pkg/serialization/lib/serialization.dart

Issue 14773027: Fix regression in meta-serializing rules (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Slight improvement for the case of duplicate library names Created 7 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 | « no previous file | pkg/serialization/lib/src/serialization_rule.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/serialization/lib/serialization.dart
diff --git a/pkg/serialization/lib/serialization.dart b/pkg/serialization/lib/serialization.dart
index c0ab0d0159d266688053a81aafa8cc97be56b712..58658405499f2d8640bba09353f1e97d5bf721eb 100644
--- a/pkg/serialization/lib/serialization.dart
+++ b/pkg/serialization/lib/serialization.dart
@@ -210,6 +210,7 @@ import 'src/serialization_helpers.dart';
import 'dart:async';
import 'dart:json' as json;
import 'dart:collection';
+import 'dart:uri';
part 'src/reader_writer.dart';
part 'src/serialization_rule.dart';
@@ -258,7 +259,8 @@ class Serialization {
// TODO(alanknight): Should this be moved to the format?
// TODO(alanknight): Allow self-describing in the presence of CustomRule.
if (_selfDescribing != null) return _selfDescribing;
- return !rules.any((x) => x is CustomRule);
+ _selfDescribing = !rules.any((x) => x is CustomRule && x is! SymbolRule);
+ return _selfDescribing;
}
/**
@@ -319,8 +321,7 @@ class Serialization {
List<String> fields,
List<String> excludeFields}) {
- var rule;
- rule = new BasicRule(
+ var rule = new BasicRule(
turnInstanceIntoSomethingWeCanUse(
instanceOfType),
constructor, constructorFields, fields, excludeFields);
@@ -464,7 +465,8 @@ class Serialization {
fields: [])
..addRule(new NamedObjectRule())
..addRule(new MirrorRule())
- ..addRule(new SymbolRule());
+ ..addRuleFor(new MirrorRule())
+ ..addRuleFor(new SymbolRule());
meta.namedObjects = namedObjects;
return meta;
}
« no previous file with comments | « no previous file | pkg/serialization/lib/src/serialization_rule.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698