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

Issue 565123002: Maintaing the proper order of initialization WeakPtrFactory (Closed)

Created:
6 years, 3 months ago by ARUNKK
Modified:
6 years, 1 month ago
Reviewers:
brettw, Charlie, awong, Nico
CC:
chromium-reviews, wfh+watch_chromium.org, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Maintaing the proper order of initialization WeakPtrFactory Changing in the intialization order of WeakPtrFactory in "src/base" module such that all member variables should appear before the WeakPtrFactory to ensure that any WeakPtrs to Controller are invalidated before its members variable's destructors are executed, rendering them invalid. BUG=303818 Committed: https://crrev.com/7ce4adfebbda4208511fea7d58eb3e96e296337f Cr-Commit-Position: refs/heads/master@{#294741}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -9 lines) Patch
M base/cancelable_callback.h View 1 chunk +2 lines, -3 lines 2 comments Download
M base/task/cancelable_task_tracker.h View 1 chunk +2 lines, -1 line 0 comments Download
M base/task/cancelable_task_tracker.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/win/object_watcher.h View 1 chunk +2 lines, -1 line 0 comments Download
M base/win/object_watcher.cc View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 22 (9 generated)
ARUNKK
mark@chromium.org: Please review changes in thakis@chromium.org: Please review changes in PTAL.
6 years, 3 months ago (2014-09-12 10:30:41 UTC) #2
Mark Mentovai
I’m currently unable to do reviews that aren’t related to bugs 386208 and 399276. Please ...
6 years, 3 months ago (2014-09-12 12:30:28 UTC) #4
Nico
lgtm, thanks!
6 years, 3 months ago (2014-09-12 17:44:52 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/565123002/1
6 years, 3 months ago (2014-09-12 21:53:49 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/15167)
6 years, 3 months ago (2014-09-12 22:18:00 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/565123002/1
6 years, 3 months ago (2014-09-13 08:29:45 UTC) #14
commit-bot: I haz the power
Committed patchset #1 (id:1) as cbd982690789d1b17683dab5c237d5591ed605ad
6 years, 3 months ago (2014-09-13 08:53:15 UTC) #15
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/7ce4adfebbda4208511fea7d58eb3e96e296337f Cr-Commit-Position: refs/heads/master@{#294741}
6 years, 3 months ago (2014-09-13 08:57:55 UTC) #16
Charlie
This seems to be generating a compile error for me when I try to create ...
6 years, 1 month ago (2014-11-06 22:57:06 UTC) #18
Nico
The joy of template specializations :-/ https://codereview.chromium.org/565123002/diff/1/base/cancelable_callback.h File base/cancelable_callback.h (right): https://codereview.chromium.org/565123002/diff/1/base/cancelable_callback.h#newcode117 base/cancelable_callback.h:117: base::WeakPtrFactory<CancelableCallback<void(void)> > weak_factory_; ...
6 years, 1 month ago (2014-11-06 22:59:49 UTC) #19
Charlie
Um. I can do the simple fix. But I am no template wizard :-) On ...
6 years, 1 month ago (2014-11-06 23:03:08 UTC) #20
Nico
I think the template wizard fix is fairly mechanical: Take the one-argument A1 version, replace ...
6 years, 1 month ago (2014-11-06 23:10:29 UTC) #21
Charlie
6 years, 1 month ago (2014-11-07 19:23:35 UTC) #22
Message was sent while issue was closed.
Thanks, I think I got it. Code review coming your way :-)

On Thu Nov 06 2014 at 3:10:28 PM Nico Weber <thakis@chromium.org> wrote:

> I think the template wizard fix is fairly mechanical: Take the
> one-argument A1 version, replace `template<typename A1>` with `template
> typename... A1>`, and then replace `A1` with `A1...`. Delete the 0 and 2
> argument versions, the new variadic version should cover them. Maybe give
> it a try, and I can try to talk you through if you run into problems?
>
> On Thu, Nov 6, 2014 at 3:03 PM, Charlie Kehoe <ckehoe@chromium.org> wrote:
>
>> Um. I can do the simple fix. But I am no template wizard :-)
>>
>>
>> On Thu Nov 06 2014 at 2:59:49 PM <thakis@chromium.org> wrote:
>>
>>> The joy of template specializations :-/
>>>
>>>
>>> https://codereview.chromium.org/565123002/diff/1/base/cancel
>>> able_callback.h
>>> File base/cancelable_callback.h (right):
>>>
>>> https://codereview.chromium.org/565123002/diff/1/base/cancel
>>> able_callback.h#newcode117
>>> base/cancelable_callback.h:117
>>>
<https://codereview.chromium.org/565123002/diff/1/base/cancelable_callback.h#n...>
>>> :
>>> base::WeakPtrFactory<CancelableCallback<void(void)> > weak_factory_;
>>> Heh, changing that down there and not up here looks like a bug too. We
>>> should probably convert this class to use a variadic template instead of
>>> the manual copypasta we have today, together with fixing this bug.
>>> ckehoe, do you want to give this a try?
>>>
>>> https://codereview.chromium.org/565123002/
>>>
>>
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698