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

Issue 7633038: Relax software rendering list parsing. (Closed)

Created:
9 years, 4 months ago by Zhenyao Mo
Modified:
9 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, apatrick_chromium, Paweł Hajdan Jr.
Visibility:
Public.

Description

Relax software rendering list parsing. At the moment if we fail to process one entry, like encountering an unrecognized field, we fail the whole blacklist loading. This CL relaxes this behavior, so if we encounter unknown features, ignore them but keep the entry; if we encounter unknown fields in an entry, ignore the entry but keep the rest of the blacklist. BUG=91872 TEST=unittest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98162

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Total comments: 12

Patch Set 3 : '' #

Total comments: 10

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+238 lines, -83 lines) Patch
M chrome/browser/web_resource/gpu_blacklist_updater.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/gpu/gpu_blacklist.h View 1 2 3 4 8 chunks +45 lines, -13 lines 1 comment Download
M content/browser/gpu/gpu_blacklist.cc View 1 2 3 4 11 chunks +55 lines, -52 lines 1 comment Download
M content/browser/gpu/gpu_blacklist_unittest.cc View 1 2 3 4 14 chunks +134 lines, -16 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Zhenyao Mo
Please review.
9 years, 4 months ago (2011-08-12 22:29:07 UTC) #1
Zhenyao Mo
Ping. Vangelis, this must have fallen out of your radar.
9 years, 4 months ago (2011-08-18 18:18:06 UTC) #2
vangelis
Sorry for the late review.. http://codereview.chromium.org/7633038/diff/1/content/browser/gpu/gpu_blacklist.cc File content/browser/gpu/gpu_blacklist.cc (right): http://codereview.chromium.org/7633038/diff/1/content/browser/gpu/gpu_blacklist.cc#newcode649 content/browser/gpu/gpu_blacklist.cc:649: continue; It seems to ...
9 years, 4 months ago (2011-08-18 20:51:11 UTC) #3
vangelis
http://codereview.chromium.org/7633038/diff/1/content/browser/gpu/gpu_blacklist.cc File content/browser/gpu/gpu_blacklist.cc (right): http://codereview.chromium.org/7633038/diff/1/content/browser/gpu/gpu_blacklist.cc#newcode599 content/browser/gpu/gpu_blacklist.cc:599: bool current_os_only, One more thing. Having two bool's next ...
9 years, 4 months ago (2011-08-18 21:15:11 UTC) #4
Zhenyao Mo
On 2011/08/18 21:15:11, vangelis wrote: > http://codereview.chromium.org/7633038/diff/1/content/browser/gpu/gpu_blacklist.cc > File content/browser/gpu/gpu_blacklist.cc (right): > > http://codereview.chromium.org/7633038/diff/1/content/browser/gpu/gpu_blacklist.cc#newcode599 > ...
9 years, 4 months ago (2011-08-19 20:05:37 UTC) #5
vangelis
http://codereview.chromium.org/7633038/diff/15006/content/browser/gpu/gpu_blacklist.cc File content/browser/gpu/gpu_blacklist.cc (right): http://codereview.chromium.org/7633038/diff/15006/content/browser/gpu/gpu_blacklist.cc#newcode641 content/browser/gpu/gpu_blacklist.cc:641: error = true; I find the use of the ...
9 years, 4 months ago (2011-08-19 22:50:07 UTC) #6
Zhenyao Mo
Revised. Please review again. http://codereview.chromium.org/7633038/diff/15006/content/browser/gpu/gpu_blacklist.cc File content/browser/gpu/gpu_blacklist.cc (right): http://codereview.chromium.org/7633038/diff/15006/content/browser/gpu/gpu_blacklist.cc#newcode641 content/browser/gpu/gpu_blacklist.cc:641: error = true; On 2011/08/19 ...
9 years, 4 months ago (2011-08-23 22:16:43 UTC) #7
vangelis
I like the ref-counted pointer cleanup! Just a few more comments. http://codereview.chromium.org/7633038/diff/22005/content/browser/gpu/gpu_blacklist.cc File content/browser/gpu/gpu_blacklist.cc (right): ...
9 years, 4 months ago (2011-08-24 19:00:17 UTC) #8
Zhenyao Mo
Revised, please have another look. http://codereview.chromium.org/7633038/diff/22005/content/browser/gpu/gpu_blacklist.cc File content/browser/gpu/gpu_blacklist.cc (right): http://codereview.chromium.org/7633038/diff/22005/content/browser/gpu/gpu_blacklist.cc#newcode630 content/browser/gpu/gpu_blacklist.cc:630: bool error = false; ...
9 years, 4 months ago (2011-08-24 22:29:57 UTC) #9
Zhenyao Mo
Revised again, so now it always skips a entry if it contains an unknown field, ...
9 years, 4 months ago (2011-08-24 23:56:39 UTC) #10
vangelis
LGTM Thanks for all the iterations! http://codereview.chromium.org/7633038/diff/34002/content/browser/gpu/gpu_blacklist.h File content/browser/gpu/gpu_blacklist.h (right): http://codereview.chromium.org/7633038/diff/34002/content/browser/gpu/gpu_blacklist.h#newcode319 content/browser/gpu/gpu_blacklist.h:319: // Check if ...
9 years, 4 months ago (2011-08-25 01:18:52 UTC) #11
Ken Russell (switch to Gerrit)
http://codereview.chromium.org/7633038/diff/34002/content/browser/gpu/gpu_blacklist.cc File content/browser/gpu/gpu_blacklist.cc (right): http://codereview.chromium.org/7633038/diff/34002/content/browser/gpu/gpu_blacklist.cc#newcode423 content/browser/gpu/gpu_blacklist.cc:423: return entry.release(); This is the leak. The ScopedGpuBlacklistEntry constructor ...
9 years, 4 months ago (2011-08-25 18:03:31 UTC) #12
vangelis
On 2011/08/25 18:03:31, kbr wrote: > http://codereview.chromium.org/7633038/diff/34002/content/browser/gpu/gpu_blacklist.cc > File content/browser/gpu/gpu_blacklist.cc (right): > > http://codereview.chromium.org/7633038/diff/34002/content/browser/gpu/gpu_blacklist.cc#newcode423 > ...
9 years, 4 months ago (2011-08-25 18:30:06 UTC) #13
Zhenyao Mo
9 years, 4 months ago (2011-08-25 21:29:57 UTC) #14
On 2011/08/25 18:03:31, kbr wrote:
>
http://codereview.chromium.org/7633038/diff/34002/content/browser/gpu/gpu_bla...
> File content/browser/gpu/gpu_blacklist.cc (right):
> 
>
http://codereview.chromium.org/7633038/diff/34002/content/browser/gpu/gpu_bla...
> content/browser/gpu/gpu_blacklist.cc:423: return entry.release();
> This is the leak. The ScopedGpuBlacklistEntry constructor above gives the
> GpuBlacklistEntry a ref count of 1. This release call does *not* adjust the
> reference count, just sets the referent to NULL, so the returned pointer still
> has a reference count of 1. The caller wraps the return value in a
> ScopedGpuBlacklistEntry, incrementing its reference count again (to 2) and
when
> that wrapper is later deleted the refcount only goes down to 1, never 0, so
all
> of the blacklist entries are being leaked. The fix is to change the return
value
> of this function to a ScopedGpuBlacklistEntry.

Ah,  I was confused this release with the release in the ref_counted class, and
thought both of them would reduce the ref count.

Thanks a lot Ken!

Powered by Google App Engine
This is Rietveld 408576698