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

Issue 335613002: Fix memory leak in GraphicsContextState. (Closed)

Created:
6 years, 6 months ago by Dominik Grewe
Modified:
6 years, 6 months ago
CC:
blink-reviews, jamesr, krit, jbroman, danakj, Rik, Stephen Chennney, pdr., rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Fix memory leak in GraphicsContextState. In GraphicsContextState::copy we use placement-new to overwrite the current object. We need to first call the object's destructor though to not leak any memory. BUG=383548 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176106

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -0 lines) Patch
M Source/platform/graphics/GraphicsContextState.cpp View 1 chunk +1 line, -0 lines 2 comments Download

Messages

Total messages: 9 (0 generated)
Dominik Grewe
ptal
6 years, 6 months ago (2014-06-12 11:18:49 UTC) #1
f(malita)
LGTM Is there a good way to refactor this to avoid placement new? I can't ...
6 years, 6 months ago (2014-06-12 13:30:35 UTC) #2
Dominik Grewe
On 2014/06/12 13:30:35, Florin Malita wrote: > LGTM > > Is there a good way ...
6 years, 6 months ago (2014-06-12 13:40:42 UTC) #3
jbroman
https://codereview.chromium.org/335613002/diff/1/Source/platform/graphics/GraphicsContextState.cpp File Source/platform/graphics/GraphicsContextState.cpp (right): https://codereview.chromium.org/335613002/diff/1/Source/platform/graphics/GraphicsContextState.cpp#newcode62 Source/platform/graphics/GraphicsContextState.cpp:62: this->~GraphicsContextState(); Wouldn't it be more straightforward to just make ...
6 years, 6 months ago (2014-06-12 13:43:07 UTC) #4
Dominik Grewe
https://codereview.chromium.org/335613002/diff/1/Source/platform/graphics/GraphicsContextState.cpp File Source/platform/graphics/GraphicsContextState.cpp (right): https://codereview.chromium.org/335613002/diff/1/Source/platform/graphics/GraphicsContextState.cpp#newcode62 Source/platform/graphics/GraphicsContextState.cpp:62: this->~GraphicsContextState(); On 2014/06/12 13:43:07, jbroman wrote: > Wouldn't it ...
6 years, 6 months ago (2014-06-12 13:50:19 UTC) #5
Dominik Grewe
I'm going to land this for now to get rid of the leak. If any ...
6 years, 6 months ago (2014-06-13 08:39:41 UTC) #6
Dominik Grewe
The CQ bit was checked by dominikg@chromium.org
6 years, 6 months ago (2014-06-13 08:39:44 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominikg@chromium.org/335613002/1
6 years, 6 months ago (2014-06-13 08:41:03 UTC) #8
commit-bot: I haz the power
6 years, 6 months ago (2014-06-13 09:46:20 UTC) #9
Message was sent while issue was closed.
Change committed as 176106

Powered by Google App Engine
This is Rietveld 408576698