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

Issue 1527063002: Fix a leak in TestingJsonParser. (Closed)

Created:
5 years ago by Robert Sesek
Modified:
5 years ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, Eran Messeri
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a leak in TestingJsonParser. This can occur if the Parse() completion callback quits the run loop, since the parser is freed using DeleteSoon() in a task posted after the callbacks. Committed: https://crrev.com/5ab681bdaf33de3e075ebdc3e84ab91640655f47 Cr-Commit-Position: refs/heads/master@{#365539}

Patch Set 1 : Test to verify leak #

Patch Set 2 : With fix #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -2 lines) Patch
M components/components_tests.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M components/safe_json/testing_json_parser.cc View 1 1 chunk +3 lines, -2 lines 2 comments Download
A components/safe_json/testing_json_parser_unittest.cc View 1 chunk +77 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (8 generated)
Robert Sesek
First patch set has a trybot showing the leak, second fixes it.
5 years ago (2015-12-15 20:50:01 UTC) #5
Bernhard Bauer
LGTM, thanks! https://codereview.chromium.org/1527063002/diff/40001/components/safe_json/testing_json_parser.cc File components/safe_json/testing_json_parser.cc (left): https://codereview.chromium.org/1527063002/diff/40001/components/safe_json/testing_json_parser.cc#oldcode55 components/safe_json/testing_json_parser.cc:55: base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); Hm… in principle we could ...
5 years ago (2015-12-16 08:48:00 UTC) #7
Robert Sesek
https://codereview.chromium.org/1527063002/diff/40001/components/safe_json/testing_json_parser.cc File components/safe_json/testing_json_parser.cc (left): https://codereview.chromium.org/1527063002/diff/40001/components/safe_json/testing_json_parser.cc#oldcode55 components/safe_json/testing_json_parser.cc:55: base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); On 2015/12/16 08:48:00, Bernhard Bauer wrote: > ...
5 years ago (2015-12-16 15:55:50 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1527063002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1527063002/40001
5 years ago (2015-12-16 15:56:23 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:40001)
5 years ago (2015-12-16 16:25:46 UTC) #12
commit-bot: I haz the power
5 years ago (2015-12-16 16:27:40 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5ab681bdaf33de3e075ebdc3e84ab91640655f47
Cr-Commit-Position: refs/heads/master@{#365539}

Powered by Google App Engine
This is Rietveld 408576698