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

Issue 1320023009: Limit stack-allocated uses of CancellableTaskFactory(PassOwnPtr<Closure>). (Closed)

Created:
5 years, 3 months ago by sof
Modified:
5 years, 3 months ago
Reviewers:
haraken, scheduler-bugs
CC:
blink-reviews, scheduler-bugs_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Limit stack-allocated uses of CancellableTaskFactory(PassOwnPtr<Closure>). Classes that keep a CancellableTaskFactory should create() these via the provided factory method, which takes care of creating the task factory's closure in a manner that doesn't cause an (Oilpan) leak. Not using the factory method is convenient when testing, so accommodate this by way of a protected CancellableTaskFactory<> constructor, and use it in unit tests. The unit tests exercise functionality rather than direct usage by Blink objects, so hiding the constructor is considered acceptable. R=haraken BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201916

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -22 lines) Patch
M Source/platform/scheduler/CancellableTaskFactory.h View 2 chunks +9 lines, -7 lines 0 comments Download
M Source/platform/scheduler/CancellableTaskFactoryTest.cpp View 11 chunks +27 lines, -15 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
sof
please take a look/consider. I'd like to steer users away from using the CancellableTaskFactory ctor ...
5 years, 3 months ago (2015-09-08 13:05:04 UTC) #2
haraken
LGTM
5 years, 3 months ago (2015-09-08 14:08:29 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320023009/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320023009/1
5 years, 3 months ago (2015-09-08 14:29:22 UTC) #5
commit-bot: I haz the power
5 years, 3 months ago (2015-09-08 15:09:50 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201916

Powered by Google App Engine
This is Rietveld 408576698