|
|
Descriptionandroid_webview : Class member variable WeakPtrFactory in proper order.
Maintaing the proper WeakPtrFactory destruction order to avoid the runtime
issue like unrleased memory,etc...
WeakPtrFactory should remain the last member so it'll be destroyed and
invalidate its weak pointers before any other members are destroyed.
BUG=303818
Committed: https://crrev.com/e84a1d22e950b8b12eb08124a57d0d23f907bcee
Cr-Commit-Position: refs/heads/master@{#294569}
Patch Set 1 #
Total comments: 2
Patch Set 2 : . #Patch Set 3 : rebase #
Messages
Total messages: 33 (9 generated)
kulkarni.a@samsung.com changed reviewers: + michaelbai@chromium.org, mkosiba@chromium.org
michaelbai@chromium.org: Please review changes in src/android_webview mkosiba@chromium.org: Please review changes in src/android_webview
On 2014/08/26 14:03:11, kulkarni.a wrote: > mailto:michaelbai@chromium.org: Please review changes in src/android_webview > > mailto:mkosiba@chromium.org: Please review changes in > src/android_webview I were never realized this issue, could you also help to update the comment of WeakPtrFactory?
On 2014/08/27 03:15:01, michaelbai wrote: > On 2014/08/26 14:03:11, kulkarni.a wrote: > > mailto:michaelbai@chromium.org: Please review changes in src/android_webview > > > > mailto:mkosiba@chromium.org: Please review changes in > > src/android_webview > > I were never realized this issue, could you also help to update the comment of > WeakPtrFactory? Dear michaelbai, I'm getting your comments meaning, could you please elaborate little explanatory.
On 2014/08/27 14:17:21, kulkarni.a wrote: > On 2014/08/27 03:15:01, michaelbai wrote: > > On 2014/08/26 14:03:11, kulkarni.a wrote: > > > mailto:michaelbai@chromium.org: Please review changes in src/android_webview > > > > > > mailto:mkosiba@chromium.org: Please review changes in > > > src/android_webview > > > > I were never realized this issue, could you also help to update the comment of > > WeakPtrFactory? > > Dear michaelbai, > I'm getting your comments meaning, could you please elaborate little > explanatory. Would you like update the document of WeakPtrFactory to say it should be the last member of class?
On 2014/08/28 04:05:24, michaelbai wrote: > On 2014/08/27 14:17:21, kulkarni.a wrote: > > On 2014/08/27 03:15:01, michaelbai wrote: > > > On 2014/08/26 14:03:11, kulkarni.a wrote: > > > > mailto:michaelbai@chromium.org: Please review changes in > src/android_webview > > > > > > > > mailto:mkosiba@chromium.org: Please review changes in > > > > src/android_webview > > > > > > I were never realized this issue, could you also help to update the comment > of > > > WeakPtrFactory? > > > > Dear michaelbai, > > I'm getting your comments meaning, could you please elaborate little > > explanatory. > > Would you like update the document of WeakPtrFactory to say it should be the > last member of class?
On 2014/08/28 06:32:06, kulkarni.a wrote: > On 2014/08/28 04:05:24, michaelbai wrote: > > On 2014/08/27 14:17:21, kulkarni.a wrote: > > > On 2014/08/27 03:15:01, michaelbai wrote: > > > > On 2014/08/26 14:03:11, kulkarni.a wrote: > > > > > mailto:michaelbai@chromium.org: Please review changes in > > src/android_webview > > > > > > > > > > mailto:mkosiba@chromium.org: Please review changes in > > > > > src/android_webview > > > > > > > > I were never realized this issue, could you also help to update the > comment > > of > > > > WeakPtrFactory? > > > > > > Dear michaelbai, > > > I'm getting your comments meaning, could you please elaborate little > > > explanatory. > > > > Would you like update the document of WeakPtrFactory to say it should be the > > last member of class? Dear michaelbai, Please refer the below links . http://comments.gmane.org/gmane.comp.web.chromium.devel/45692 https://code.google.com/p/chromium/issues/detail?id=303818 FYI- ------------------------------------------- This is because members are destructed in reverse-order that they appear in the class definition. See 12.6.2 of the C++ standard... """ Initialization shall proceed in the following order: — First, and only for the constructor of the most derived class as described below, virtual base classes shall be initialized in the order they appear on a depth-first left-to-right traversal of the directed acyclic graph of base classes, where “left-to-right” is the order of appearance of the base class names in the derived class base-specifierlist. — Then, direct base classes shall be initialized in declaration order as they appear in the base-specifier-list (regardless of the order of the mem-initializers). — Then, non-static data members shall be initialized in the order they were declared in the class definition (again regardless of the order of the mem-initializers). — Finally, the body of the constructor is executed. [Note: the declaration order is mandated to ensure that base and member subobjects are destroyed in the reverse order of initialization. — end note] """ ----------------------------------------------- Thanks, Arun Kulkarni.
lgtm
The CQ bit was checked by kulkarni.a@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kulkarni.a@samsung.com/509453002/1
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_d...) android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tes...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tes...)
lgtm https://codereview.chromium.org/509453002/diff/1/android_webview/browser/net/... File android_webview/browser/net/android_stream_reader_url_request_job.h (right): https://codereview.chromium.org/509453002/diff/1/android_webview/browser/net/... android_webview/browser/net/android_stream_reader_url_request_job.h:121: base::WeakPtrFactory<AndroidStreamReaderURLRequestJob> weak_factory_; maybe add a commend saying that the WeakPtrFactory needs to be last in order to prevent the next person adding something below it?
https://codereview.chromium.org/509453002/diff/1/android_webview/browser/net/... File android_webview/browser/net/android_stream_reader_url_request_job.h (right): https://codereview.chromium.org/509453002/diff/1/android_webview/browser/net/... android_webview/browser/net/android_stream_reader_url_request_job.h:121: base::WeakPtrFactory<AndroidStreamReaderURLRequestJob> weak_factory_; On 2014/09/01 08:59:37, mkosiba wrote: > maybe add a commend saying that the WeakPtrFactory needs to be last in order to > prevent the next person adding something below it? ah, just looked at the bug - are you going to add a clang checker?
The CQ bit was checked by kulkarni.a@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kulkarni.a@samsung.com/509453002/1
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_d...) android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tes...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_d...)
The CQ bit was checked by kulkarni.a@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/509453002/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/55117) ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator...) ios_rel_device on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device/bu...) ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ni...) mac_chromium_compile_dbg on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...) win8_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel...) win_chromium_compile_dbg on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
The CQ bit was checked by kulkarni.a@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/509453002/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/55145) ios_rel_device on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device/bu...) ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ni...) mac_chromium_compile_dbg on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...) win8_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel...) win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by kulkarni.a@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/509453002/40001
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as 1119659ffd0f8fb91fdb7be15aed2ce8f7263b37
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/e84a1d22e950b8b12eb08124a57d0d23f907bcee Cr-Commit-Position: refs/heads/master@{#294569} |