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

Issue 170713007: Resubmit of 149313003: Significantly cleans up the ImageWriter Operation class and subclasses. (Closed)

Created:
6 years, 10 months ago by Drew Haven
Modified:
6 years, 10 months ago
Reviewers:
tbarzic
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Fixes memory leak in 149313003. The leak was caused by the modular testing not forcing the run-and-clear of clean-up callbacks. This left a callback owned by the object which increment the refcount of the object. These callbacks should be removed and a different method of ensuring cleanup should be employed. Ideally we can find a way to get rid of the ref-counting on the object to avoid this sort of issue in the future, but currently the operation manager lives on the IO thread and the Operation must work on the FILE thread. A sequenced task queue or a worker may be useful. Previous CL: https://codereview.chromium.org/149313003/ BUG=292956 BUG=337883 BUG=335404 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251984

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fixes comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+972 lines, -868 lines) Patch
M chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.cc View 2 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation_unittest.cc View 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc View 3 chunks +5 lines, -18 lines 0 comments Download
D chrome/browser/extensions/api/image_writer_private/image_writer_utils.h View 1 chunk +0 lines, -53 lines 0 comments Download
D chrome/browser/extensions/api/image_writer_private/image_writer_utils.cc View 1 chunk +0 lines, -127 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation.h View 1 7 chunks +51 lines, -30 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation.cc View 6 chunks +163 lines, -148 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_chromeos.cc View 1 chunk +24 lines, -17 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_linux.cc View 1 chunk +122 lines, -140 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_mac.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_manager.h View 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_manager.cc View 7 chunks +9 lines, -18 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_unittest.cc View 1 2 chunks +173 lines, -57 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_win.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/test_utils.h View 2 chunks +6 lines, -9 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/test_utils.cc View 2 chunks +4 lines, -27 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_file_operation.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_file_operation.cc View 1 chunk +13 lines, -11 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_file_operation_unittest.cc View 1 chunk +42 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h View 2 chunks +40 lines, -31 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_url_operation.cc View 4 chunks +86 lines, -155 lines 0 comments Download
A chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc View 1 chunk +212 lines, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Drew Haven
Toni, Apparently I introduced a memory leak in that CL from last week. What happened ...
6 years, 10 months ago (2014-02-18 21:47:36 UTC) #1
tbarzic
btw. uploading the reverted cl (with no fixes) first would make it easier to see ...
6 years, 10 months ago (2014-02-18 22:13:14 UTC) #2
Drew Haven
On 2014/02/18 22:13:14, tbarzic wrote: > btw. uploading the reverted cl (with no fixes) first ...
6 years, 10 months ago (2014-02-19 00:10:19 UTC) #3
Drew Haven
I think I addressed these two things. For the moment I'd like to get this ...
6 years, 10 months ago (2014-02-19 00:49:19 UTC) #4
tbarzic
for reusing cls: I remember a PSA on chromium-dev some time ago about banning this ...
6 years, 10 months ago (2014-02-19 01:20:15 UTC) #5
Drew Haven
The CQ bit was checked by haven@chromium.org
6 years, 10 months ago (2014-02-19 02:02:51 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haven@chromium.org/170713007/80001
6 years, 10 months ago (2014-02-19 02:03:27 UTC) #7
commit-bot: I haz the power
6 years, 10 months ago (2014-02-19 07:55:23 UTC) #8
Message was sent while issue was closed.
Change committed as 251984

Powered by Google App Engine
This is Rietveld 408576698