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

Issue 5075003: Converts usage of SetProp/GetProp to a map. Even after making sure we (Closed)

Created:
10 years, 1 month ago by sky
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, darin-cc_chromium.org, ben+cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Converts usage of SetProp/GetProp to a map. Even after making sure we clean up props we still leak in a handful of cases that are causing test grief. By and large our usage of properties is for inside the application, so that a map works fine. BUG=61528 44991 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66784

Patch Set 1 #

Patch Set 2 : Fix views/gtkk and cleanup #

Patch Set 3 : git add view_prop_unittest.cc #

Patch Set 4 : Move to app #

Total comments: 4

Patch Set 5 : Fix gyp files #

Unified diffs Side-by-side diffs Delta from patch set Stats (+356 lines, -138 lines) Patch
M app/app.gyp View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M app/app_base.gypi View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
A app/view_prop.h View 1 chunk +47 lines, -0 lines 0 comments Download
A app/view_prop.cc View 1 chunk +106 lines, -0 lines 0 comments Download
A app/view_prop_unittest.cc View 1 chunk +70 lines, -0 lines 0 comments Download
M app/win/scoped_prop.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/external_tab_container_win.h View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/external_tab_container_win.cc View 1 2 3 6 chunks +9 lines, -11 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_win.h View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_win.cc View 1 2 3 7 chunks +15 lines, -16 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 chunks +4 lines, -13 lines 0 comments Download
M views/accessibility/view_accessibility.h View 1 chunk +1 line, -1 line 0 comments Download
M views/accessibility/view_accessibility.cc View 1 2 3 2 chunks +6 lines, -5 lines 0 comments Download
M views/controls/native_control.cc View 1 2 3 5 chunks +8 lines, -7 lines 0 comments Download
M views/controls/native_control_win.h View 1 2 3 3 chunks +3 lines, -5 lines 0 comments Download
M views/controls/native_control_win.cc View 1 2 3 3 chunks +7 lines, -6 lines 0 comments Download
M views/focus/focus_util_win.h View 1 2 3 1 chunk +4 lines, -6 lines 0 comments Download
M views/focus/focus_util_win.cc View 1 2 3 2 chunks +10 lines, -8 lines 0 comments Download
M views/widget/child_window_message_processor.h View 1 2 3 2 chunks +3 lines, -5 lines 0 comments Download
M views/widget/child_window_message_processor.cc View 1 2 3 1 chunk +8 lines, -5 lines 0 comments Download
M views/widget/widget.h View 1 chunk +2 lines, -3 lines 0 comments Download
M views/widget/widget_gtk.h View 1 chunk +2 lines, -3 lines 0 comments Download
M views/widget/widget_gtk.cc View 2 3 3 chunks +5 lines, -7 lines 0 comments Download
M views/widget/widget_win.h View 1 2 3 4 chunks +5 lines, -8 lines 0 comments Download
M views/widget/widget_win.cc View 1 2 3 9 chunks +22 lines, -24 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
sky
10 years, 1 month ago (2010-11-16 23:57:42 UTC) #1
sky
Ping On Tue, Nov 16, 2010 at 3:57 PM, <sky@chromium.org> wrote: > Reviewers: cpu, > ...
10 years, 1 month ago (2010-11-18 02:14:51 UTC) #2
Ben Goodger (Google)
The only real question I have is since this is not windows-specific anymore can you ...
10 years, 1 month ago (2010-11-18 20:31:15 UTC) #3
cpu_(ooo_6.6-7.5)
looking good, just two questions. http://codereview.chromium.org/5075003/diff/11001/app/view_prop.cc File app/view_prop.cc (right): http://codereview.chromium.org/5075003/diff/11001/app/view_prop.cc#newcode36 app/view_prop.cc:36: void set_data(void* data) { ...
10 years, 1 month ago (2010-11-18 22:49:14 UTC) #4
sky
I've also moved ViewProp to app as Ben suggested. -Scott http://codereview.chromium.org/5075003/diff/11001/app/view_prop.cc File app/view_prop.cc (right): http://codereview.chromium.org/5075003/diff/11001/app/view_prop.cc#newcode36 ...
10 years, 1 month ago (2010-11-18 23:16:31 UTC) #5
cpu_(ooo_6.6-7.5)
10 years, 1 month ago (2010-11-19 18:22:17 UTC) #6
lgtm


On 2010/11/18 23:16:31, sky wrote:
> I've also moved ViewProp to app as Ben suggested.
> 
>   -Scott
> 
> http://codereview.chromium.org/5075003/diff/11001/app/view_prop.cc
> File app/view_prop.cc (right):
> 
> http://codereview.chromium.org/5075003/diff/11001/app/view_prop.cc#newcode36
> app/view_prop.cc:36: void set_data(void* data) { data_ = data; }
> On 2010/11/18 22:49:15, cpu wrote:
> > shouldn't set to NULL remove the item? if so above Get would need to deal
with
> > that.
> 
> data_ is just the arbitrary value and it's used by these classes (only by the
> users of ViewProp). The Data instance is removed from the map when there are
no
> more references. But maybe I'm misunderstanding your question?
> 
> http://codereview.chromium.org/5075003/diff/11001/app/view_prop_unittest.cc
> File app/view_prop_unittest.cc (right):
> 
>
http://codereview.chromium.org/5075003/diff/11001/app/view_prop_unittest.cc#n...
> app/view_prop_unittest.cc:30: ViewProp prop(nv1, kKey1, data1);
> On 2010/11/18 22:49:15, cpu wrote:
> > so being refcounted does not cause a problem when instanciated in the stack?
> 
> ViewProp isn't ref-counted. ViewProp::Data is though.

Powered by Google App Engine
This is Rietveld 408576698