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

Issue 225023034: Make sure named item cache is always valid HTMLCollection::updateIdNameCache() (Closed)

Created:
6 years, 8 months ago by Inactive
Modified:
6 years, 7 months ago
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Visibility:
Public.

Description

Make sure named item cache is always valid HTMLCollection::updateIdNameCache() Make sure named item cache is always valid HTMLCollection::updateIdNameCache(). The method was previously creating and setting the cache map first and then traverse the DOM tree to populate it. However, finding matches in the DOM tree can cause HTMLCollection::invalidateCache() to be called under certain circumstances. Therefore, this patch updates updateIdNameCache() so that the cache map is set *after* traversing the DOM tree. BUG=360474 R=jochen@chromium.org, eseidel@chromium.org TEST=fast/dom/htmlcollection-selectedOptions-namedItem-crash.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171062

Patch Set 1 #

Patch Set 2 : Make constructor private #

Total comments: 2

Patch Set 3 : Move constructor to cpp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -11 lines) Patch
A LayoutTests/fast/dom/htmlcollection-selectedOptions-namedItem-crash.html View 1 chunk +17 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/htmlcollection-selectedOptions-namedItem-crash-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/html/HTMLCollection.h View 1 2 2 chunks +9 lines, -3 lines 0 comments Download
M Source/core/html/HTMLCollection.cpp View 1 2 2 chunks +9 lines, -3 lines 0 comments Download
M Source/core/html/HTMLFormControlsCollection.cpp View 3 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Inactive
6 years, 8 months ago (2014-04-08 01:48:57 UTC) #1
eseidel
lgtm. Does this affect WebKit? (perhaps we should report it to them). https://codereview.chromium.org/225023034/diff/20001/Source/core/html/HTMLCollection.h File Source/core/html/HTMLCollection.h ...
6 years, 8 months ago (2014-04-08 02:12:54 UTC) #2
Inactive
Yes, this likely affects WebKit as well although I haven't verified yet. I'll verify soon ...
6 years, 8 months ago (2014-04-08 02:21:08 UTC) #3
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 8 months ago (2014-04-08 02:22:12 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/225023034/40001
6 years, 8 months ago (2014-04-08 02:22:18 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-08 02:45:49 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 8 months ago (2014-04-08 02:45:50 UTC) #7
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 8 months ago (2014-04-08 03:03:21 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/225023034/40001
6 years, 8 months ago (2014-04-08 03:03:27 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-08 04:38:07 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 8 months ago (2014-04-08 04:38:08 UTC) #11
jochen (gone - plz use gerrit)
lgtm does WebKit have the same issue? Can you contribute the fix back?
6 years, 8 months ago (2014-04-08 07:30:24 UTC) #12
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 8 months ago (2014-04-08 14:40:22 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/225023034/40001
6 years, 8 months ago (2014-04-08 14:40:31 UTC) #14
commit-bot: I haz the power
Change committed as 171062
6 years, 8 months ago (2014-04-08 14:40:56 UTC) #15
Inactive
6 years, 7 months ago (2014-05-05 19:39:04 UTC) #16
Message was sent while issue was closed.
On 2014/04/08 07:30:24, jochen wrote:
> lgtm
> 
> does WebKit have the same issue? Can you contribute the fix back?

I have confirmed that WebKit has the same issue and I am going to contribute the
patch at:
https://bugs.webkit.org/show_bug.cgi?id=132575

Powered by Google App Engine
This is Rietveld 408576698