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

Issue 132183008: Prevent implicit WebInputEvent construction from WebInputEvent::Type (Closed)

Created:
6 years, 11 months ago by jdduke (slow)
Modified:
6 years, 8 months ago
Reviewers:
tkent
CC:
blink-reviews, jamesr, dglazkov+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Prevent implicit WebInputEvent construction from WebInputEvent::Type All concrete WebInputEvent derivatives currently accept an unsigned size parameter in the constructor, used to zero-initialize the object. This can lead to unexpected runtime behavior, e.g., a WebInputEvent::Type value can implicitly construct a WebInputEvent object. Prevent this by making the size-accepting constructor protected for all types, and preventing naked construction of a base WebInputEvent instance. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170708

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Rebase #

Patch Set 4 : Make private #

Total comments: 2

Patch Set 5 : Remove unncessary constructor guard #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -18 lines) Patch
M public/web/WebInputEvent.h View 1 2 3 4 7 chunks +35 lines, -18 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
jdduke (slow)
tkent@: PTAL. This issue has cropped up every now and then, and while there shouldn't ...
6 years, 8 months ago (2014-04-01 21:30:48 UTC) #1
tkent
lgtm https://codereview.chromium.org/132183008/diff/80001/public/web/WebInputEvent.h File public/web/WebInputEvent.h (right): https://codereview.chromium.org/132183008/diff/80001/public/web/WebInputEvent.h#newcode230 public/web/WebInputEvent.h:230: WebInputEvent(); Is this necessary?
6 years, 8 months ago (2014-04-02 00:18:49 UTC) #2
jdduke (slow)
https://codereview.chromium.org/132183008/diff/80001/public/web/WebInputEvent.h File public/web/WebInputEvent.h (right): https://codereview.chromium.org/132183008/diff/80001/public/web/WebInputEvent.h#newcode230 public/web/WebInputEvent.h:230: WebInputEvent(); On 2014/04/02 00:18:52, tkent wrote: > Is this ...
6 years, 8 months ago (2014-04-02 20:20:59 UTC) #3
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 8 months ago (2014-04-02 20:21:03 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/132183008/100001
6 years, 8 months ago (2014-04-02 20:21:11 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-02 20:31:30 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_compile_dbg
6 years, 8 months ago (2014-04-02 20:31:30 UTC) #7
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 8 months ago (2014-04-02 21:42:42 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/132183008/100001
6 years, 8 months ago (2014-04-02 21:42:48 UTC) #9
commit-bot: I haz the power
6 years, 8 months ago (2014-04-02 22:11:13 UTC) #10
Message was sent while issue was closed.
Change committed as 170708

Powered by Google App Engine
This is Rietveld 408576698