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

Issue 558673003: Oilpan: move PromiseTracker to the heap (fix build after r181646.) (Closed)

Created:
6 years, 3 months ago by sof
Modified:
6 years, 3 months ago
Reviewers:
oilpan-reviews, haraken
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, malch+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, sergeyv+blink_chromium.org, aandrey+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Oilpan: move PromiseTracker to the heap (fix build after r181646.) Follow up r181646 and make PromiseTracker work better with Oilpan. TBR=oilpan-reviews BUG=340522 NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181662

Patch Set 1 #

Total comments: 2

Patch Set 2 : Non-oilpan compile fixes #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -30 lines) Patch
M Source/core/inspector/InspectorDebuggerAgent.cpp View 1 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/inspector/PromiseTracker.h View 1 3 chunks +8 lines, -4 lines 0 comments Download
M Source/core/inspector/PromiseTracker.cpp View 1 7 chunks +68 lines, -25 lines 5 comments Download

Messages

Total messages: 9 (3 generated)
sof
Please take a look. Just trying to keep the build alive.. I decided to not ...
6 years, 3 months ago (2014-09-09 15:37:39 UTC) #2
sof
https://codereview.chromium.org/558673003/diff/1/Source/core/inspector/PromiseTracker.cpp File Source/core/inspector/PromiseTracker.cpp (left): https://codereview.chromium.org/558673003/diff/1/Source/core/inspector/PromiseTracker.cpp#oldcode135 Source/core/inspector/PromiseTracker.cpp:135: data->m_promise.setWeak(wrapper.leakPtr(), &PromiseDataWrapper::didRemovePromise); On 2014/09/09 15:37:39, sof wrote: > I ...
6 years, 3 months ago (2014-09-09 18:21:45 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/558673003/20001
6 years, 3 months ago (2014-09-09 18:27:48 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001) as 181662
6 years, 3 months ago (2014-09-09 18:28:27 UTC) #6
haraken
LGTM https://codereview.chromium.org/558673003/diff/20001/Source/core/inspector/PromiseTracker.cpp File Source/core/inspector/PromiseTracker.cpp (right): https://codereview.chromium.org/558673003/diff/20001/Source/core/inspector/PromiseTracker.cpp#newcode86 Source/core/inspector/PromiseTracker.cpp:86: return adoptPtrWillBeNoop(new PromiseDataWrapper(data->createWeakPtr(), map)); I'd write: #if ENABLE(OILPAN) ...
6 years, 3 months ago (2014-09-10 01:41:23 UTC) #8
sof
6 years, 3 months ago (2014-09-10 13:40:34 UTC) #9
Message was sent while issue was closed.
Thanks for the review.

Incoming CL to address the issues raised.

https://codereview.chromium.org/558673003/diff/20001/Source/core/inspector/Pr...
File Source/core/inspector/PromiseTracker.cpp (right):

https://codereview.chromium.org/558673003/diff/20001/Source/core/inspector/Pr...
Source/core/inspector/PromiseTracker.cpp:86: return adoptPtrWillBeNoop(new
PromiseDataWrapper(data->createWeakPtr(), map));
On 2014/09/10 01:41:23, haraken wrote:
> 
> I'd write:
> 
> #if ENABLE(OILPAN)
> return adoptPtrWillBeNoop(new PromiseDataWrapper(data, map));
> #else
> return adoptPtrWillBeNoop(new PromiseDataWrapper(data->createWeakPtr(), map));
> #endif
> 
> and completely remove createWeakPtr from oilpan builds.

Let's do that.

https://codereview.chromium.org/558673003/diff/20001/Source/core/inspector/Pr...
Source/core/inspector/PromiseTracker.cpp:120:
WeakPtrWillBeMember<PromiseTracker::PromiseData> m_data;
On 2014/09/10 01:41:23, haraken wrote:
> 
> Just to confirm: Is this WeakPtr just used to break a reference cycle and it
> doesn't need any weak semantics, right?

As far as I understand the use, the unfulfilled promise shouldn't keep the
PromiseData alive, but allow it to be pre-emptively cleared.

This isn't provided in an Oilpan setting. Nor is this GCed wrapper object held
onto once created. Addressing both in an incoming follow-up CL.

Powered by Google App Engine
This is Rietveld 408576698