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

Issue 9270022: Fix up and test FrozenElementList. (Closed)

Created:
8 years, 11 months ago by nweiz
Modified:
8 years, 11 months ago
Reviewers:
Jacob
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix up and test FrozenElementList. TBR Committed: https://code.google.com/p/dart/source/detail?r=3464

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -58 lines) Patch
M client/html/release/htmlimpl.dart View 2 chunks +36 lines, -29 lines 0 comments Download
M client/html/src/ElementWrappingImplementation.dart View 2 chunks +36 lines, -29 lines 2 comments Download
M client/tests/client/html/ElementTests.dart View 1 chunk +115 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
nweiz
8 years, 11 months ago (2012-01-20 21:04:01 UTC) #1
Jacob
https://chromiumcodereview.appspot.com/9270022/diff/1/client/html/src/ElementWrappingImplementation.dart File client/html/src/ElementWrappingImplementation.dart (right): https://chromiumcodereview.appspot.com/9270022/diff/1/client/html/src/ElementWrappingImplementation.dart#newcode140 client/html/src/ElementWrappingImplementation.dart:140: List<Element> _toList() { This list is frozen so I ...
8 years, 11 months ago (2012-01-21 01:33:47 UTC) #2
nweiz
8 years, 11 months ago (2012-01-23 21:06:52 UTC) #3
https://chromiumcodereview.appspot.com/9270022/diff/1/client/html/src/Element...
File client/html/src/ElementWrappingImplementation.dart (right):

https://chromiumcodereview.appspot.com/9270022/diff/1/client/html/src/Element...
client/html/src/ElementWrappingImplementation.dart:140: List<Element> _toList()
{
On 2012/01/21 01:33:47, Jacob wrote:
> This list is frozen so I don't understand why copying it is required.
> I'm alright with checking in this change if you add a big TODO indicating this
> is a significant potential performance bottleneck.

This is just a convenience method to make it easier to implement #map, #forEach,
and #filter by using the underlying List implementation. It's only used when the
entire list is going to be iterated over anyway, although I suppose it adds some
list-creation overhead. I'll re-implement #forEach by hand and write #map and
#filter in terms of that.

Powered by Google App Engine
This is Rietveld 408576698