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

Issue 311563003: Drop unnecessary NodeWithIndex::m_haveIndex data member (Closed)

Created:
6 years, 6 months ago by Inactive
Modified:
6 years, 6 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, sof, eae+blinkwatch, rwlbuis, Nico, Erik Corry, Jeffrey Yasskin
Visibility:
Public.

Description

Drop unnecessary NodeWithIndex::m_haveIndex data member Drop unnecessary NodeWithIndex::m_haveIndex data member. Since Node::nodeIndex() returns an unsigned integer but NodeWithIndex::m_index is signed, we can simply set m_index to -1 until it is lazily set. R=eseidel@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175299

Patch Set 1 #

Total comments: 7

Patch Set 2 : Add assertion #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -5 lines) Patch
M Source/core/dom/NodeWithIndex.h View 1 2 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Inactive
6 years, 6 months ago (2014-06-02 02:37:09 UTC) #1
eseidel
this is trading out-of-band data for in-band data. They both have their advantages. Thsi is ...
6 years, 6 months ago (2014-06-02 05:13:35 UTC) #2
eseidel
https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h File Source/core/dom/NodeWithIndex.h (right): https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h#newcode39 Source/core/dom/NodeWithIndex.h:39: , m_index(-1) Why was m_index not initialized before? I ...
6 years, 6 months ago (2014-06-02 05:14:09 UTC) #3
eseidel
https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h File Source/core/dom/NodeWithIndex.h (right): https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h#newcode39 Source/core/dom/NodeWithIndex.h:39: , m_index(-1) Why was m_index not initialized before? I ...
6 years, 6 months ago (2014-06-02 05:14:09 UTC) #4
eseidel
https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h File Source/core/dom/NodeWithIndex.h (left): https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h#oldcode48 Source/core/dom/NodeWithIndex.h:48: m_index = m_node.nodeIndex(); Can this ever return negative?
6 years, 6 months ago (2014-06-02 05:14:42 UTC) #5
Jeffrey Yasskin
https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h File Source/core/dom/NodeWithIndex.h (left): https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h#oldcode48 Source/core/dom/NodeWithIndex.h:48: m_index = m_node.nodeIndex(); On 2014/06/02 05:14:42, eseidel wrote: > ...
6 years, 6 months ago (2014-06-02 06:06:16 UTC) #6
Inactive
https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h File Source/core/dom/NodeWithIndex.h (left): https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h#oldcode48 Source/core/dom/NodeWithIndex.h:48: m_index = m_node.nodeIndex(); On 2014/06/02 05:14:42, eseidel wrote: > ...
6 years, 6 months ago (2014-06-02 12:10:22 UTC) #7
Inactive
https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h File Source/core/dom/NodeWithIndex.h (left): https://codereview.chromium.org/311563003/diff/1/Source/core/dom/NodeWithIndex.h#oldcode48 Source/core/dom/NodeWithIndex.h:48: m_index = m_node.nodeIndex(); On 2014/06/02 06:06:16, JeffreyYasskin (OOO til ...
6 years, 6 months ago (2014-06-02 12:12:19 UTC) #8
eseidel
lgtm
6 years, 6 months ago (2014-06-02 16:40:56 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/311563003/20001
6 years, 6 months ago (2014-06-02 16:41:15 UTC) #10
commit-bot: I haz the power
6 years, 6 months ago (2014-06-02 17:20:09 UTC) #11
Message was sent while issue was closed.
Change committed as 175299

Powered by Google App Engine
This is Rietveld 408576698