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

Issue 1316663004: [Oilpan] De-oilpanize ScopedPageLoadDeferrer. (Closed)

Created:
5 years, 3 months ago by Yuta Kitamura
Modified:
5 years, 3 months ago
Reviewers:
haraken, oilpan-reviews, sof
CC:
blink-reviews
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

[Oilpan] De-oilpanize ScopedPageLoadDeferrer. ScopedPageLoadDeferrer is an RAII-like class that does some work when it is constructed and destructed, just like other ScopedXXX classes. It was oilpanized in the past, and a new method, dispose(), was added to do clean-ups that had been done in the destructor. However, a few stack- allocated usages were overlooked in that change. Garbage-collected objects shouldn't be allocated on the stack. So, stack- allocated usages should be converted to heap-allocated, with dispose() calls added in every single place where the object can go out of scope. However, I find this conversion too cumbersome and less C++-idiomatic. Therefore, this patch instead de-oilpanizes ScopedPageLoadDeferrer. The only reference to will-be-heap-managed class in ScopedPageLoadDeferrer is RefPtr<LocalFrame>, so it is safe to convert it to RefPtrWillBePersistent. I think this patch makes the code cleaner overall. BUG=486590 R=haraken@chromium.org, oilpan-reviews@chromium.org, sigbjornf@opera.com Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201630

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -42 lines) Patch
M Source/core/page/ScopedPageLoadDeferrer.h View 1 chunk +4 lines, -11 lines 0 comments Download
M Source/core/page/ScopedPageLoadDeferrer.cpp View 2 chunks +1 line, -20 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 2 chunks +4 lines, -11 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Yuta Kitamura
5 years, 3 months ago (2015-09-02 04:45:46 UTC) #1
haraken
Nice refactoring. LGTM.
5 years, 3 months ago (2015-09-02 04:59:54 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1316663004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1316663004/1
5 years, 3 months ago (2015-09-02 06:05:04 UTC) #4
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/63890)
5 years, 3 months ago (2015-09-02 07:09:40 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1316663004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1316663004/1
5 years, 3 months ago (2015-09-02 07:16:00 UTC) #8
commit-bot: I haz the power
5 years, 3 months ago (2015-09-02 08:24:32 UTC) #9
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201630

Powered by Google App Engine
This is Rietveld 408576698