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

Issue 12091026: Serialization shouldn't modify the keys of a map it's iterating over (Closed)

Created:
7 years, 10 months ago by Alan Knight
Modified:
7 years, 10 months ago
Reviewers:
Jennifer Messerly
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Serialization shouldn't modify the keys of a map it's iterating over Committed: https://code.google.com/p/dart/source/detail?r=17727

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -15 lines) Patch
M pkg/serialization/lib/src/basic_rule.dart View 1 chunk +14 lines, -15 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
Alan Knight
TBR. News flash. Iterating over the keys of a map and modifying the map is ...
7 years, 10 months ago (2013-01-28 18:55:22 UTC) #1
Jennifer Messerly
7 years, 10 months ago (2013-01-28 19:45:00 UTC) #2
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/12091026/diff/1/pkg/serialization/lib/src/bas...
File pkg/serialization/lib/src/basic_rule.dart (right):

https://codereview.chromium.org/12091026/diff/1/pkg/serialization/lib/src/bas...
pkg/serialization/lib/src/basic_rule.dart:152: var newState = new Map();
one idea that might help, if the perf here is noticeable, you could scan the map
first for a Reference, and avoid allocating the new one unless you know
something needs to be replaced.

Powered by Google App Engine
This is Rietveld 408576698