|
|
Chromium Code Reviews|
Created:
4 years, 4 months ago by keishi Modified:
4 years, 4 months ago CC:
chromium-reviews, blink-reviews, kouhei+heap_chromium.org, oilpan-reviews, Mads Ager (chromium) Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionCheck if Persistent owner thread matches pointer thread and current thread
BUG=591606
Committed: https://crrev.com/77a86eb0ce77553f32ad5294e585371560e20dbb
Cr-Commit-Position: refs/heads/master@{#412852}
Patch Set 1 #Patch Set 2 : fix #
Total comments: 5
Patch Set 3 : fix #
Total comments: 6
Patch Set 4 : fix #Patch Set 5 : fix #Patch Set 6 : fix #Patch Set 7 : fix #Patch Set 8 : fix #
Messages
Total messages: 32 (20 generated)
The CQ bit was checked by keishi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Check Persistent heap BUG= ========== to ========== Check if Persistent owner thread matches pointer thread and current thread BUG= ==========
keishi@chromium.org changed reviewers: + haraken@chromium.org, oilpan-reviews@chromium.org
Add check from https://codereview.chromium.org/2050463003/ to Persistent
https://codereview.chromium.org/2208673002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/heap/Persistent.h (right): https://codereview.chromium.org/2208673002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:249: if (crossThreadnessConfiguration != CrossThreadPersistentConfiguration && m_creationThreadHeap) { I'm wondering if it's valid that m_creationThread is nullptr here. https://codereview.chromium.org/2208673002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:251: if (current && current->perThreadHeapEnabled()) { What we really want to check is m_creationThreadHeap->perThreadHeapEnabled(), right? BTW, do we really need the check? I guess all cross-thread (non-CrossThread) persistent handles should be removed immediately before enabling the per-thread heap. https://codereview.chromium.org/2208673002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:274: if (ThreadState::current()) Is it possible that ThreadState::current() is nullptr for (non-cross-thread) persistent handles?
Description was changed from ========== Check if Persistent owner thread matches pointer thread and current thread BUG= ========== to ========== Check if Persistent owner thread matches pointer thread and current thread BUG=591606 ==========
https://codereview.chromium.org/2208673002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/heap/Persistent.h (right): https://codereview.chromium.org/2208673002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:251: if (current && current->perThreadHeapEnabled()) { On 2016/08/16 13:35:48, haraken wrote: > > What we really want to check is m_creationThreadHeap->perThreadHeapEnabled(), > right? > > BTW, do we really need the check? I guess all cross-thread (non-CrossThread) > persistent handles should be removed immediately before enabling the per-thread > heap. Mistake. Done. https://codereview.chromium.org/2208673002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:274: if (ThreadState::current()) On 2016/08/16 13:35:48, haraken wrote: > > Is it possible that ThreadState::current() is nullptr for (non-cross-thread) > persistent handles? We were creating Persistent(null) before ThreadState was attached. WorkerBackingThread::initialize, V8PerIsolateData::initialize is called before m_backingThread->initialize() so V8PerIsolateData::m_activeScriptWrappables is created before the ThreadState is attached. I changed the order so that doesn't happen. Now Persistents always seem to be created with ThreadState::current(), CrossThreadPersistents are still allocated on non attached threads and that should be ok.
LGTM https://codereview.chromium.org/2208673002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/heap/Persistent.h (right): https://codereview.chromium.org/2208673002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:253: if (current) { Remove this if check. https://codereview.chromium.org/2208673002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:254: DCHECK_EQ(&ThreadState::fromObject(m_raw)->heap(), m_creationThreadHeap); Add a developer-friendly comment to help them understand what's going on when they hit the DCHECK. https://codereview.chromium.org/2208673002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:279: m_creationThreadHeap = &ThreadState::current()->heap(); ThreadState::current() => current
The CQ bit was checked by keishi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
https://codereview.chromium.org/2208673002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/heap/Persistent.h (right): https://codereview.chromium.org/2208673002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:253: if (current) { On 2016/08/17 11:14:24, haraken wrote: > > Remove this if check. Done. https://codereview.chromium.org/2208673002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:254: DCHECK_EQ(&ThreadState::fromObject(m_raw)->heap(), m_creationThreadHeap); On 2016/08/17 11:14:24, haraken wrote: > > Add a developer-friendly comment to help them understand what's going on when > they hit the DCHECK. Done. https://codereview.chromium.org/2208673002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/heap/Persistent.h:279: m_creationThreadHeap = &ThreadState::current()->heap(); On 2016/08/17 11:14:24, haraken wrote: > > ThreadState::current() => current Done.
The CQ bit was checked by keishi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by keishi@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org Link to the patchset: https://codereview.chromium.org/2208673002/#ps100001 (title: "fix")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Looks like HeapTest creates Persistent in unattached threads. I'll need to revert the ThreadState::current checks.
The CQ bit was checked by keishi@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org Link to the patchset: https://codereview.chromium.org/2208673002/#ps120001 (title: "fix")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/08/18 13:11:39, keishi wrote: > Looks like HeapTest creates Persistent in unattached threads. I'll need to > revert the ThreadState::current checks. I don't think that's a valid use. Can we update it to CrossThreadPersistent?
Message was sent while issue was closed.
Description was changed from ========== Check if Persistent owner thread matches pointer thread and current thread BUG=591606 ========== to ========== Check if Persistent owner thread matches pointer thread and current thread BUG=591606 ==========
Message was sent while issue was closed.
Committed patchset #7 (id:120001)
Message was sent while issue was closed.
Description was changed from ========== Check if Persistent owner thread matches pointer thread and current thread BUG=591606 ========== to ========== Check if Persistent owner thread matches pointer thread and current thread BUG=591606 Committed: https://crrev.com/77a86eb0ce77553f32ad5294e585371560e20dbb Cr-Commit-Position: refs/heads/master@{#412852} ==========
Message was sent while issue was closed.
Patchset 7 (id:??) landed as https://crrev.com/77a86eb0ce77553f32ad5294e585371560e20dbb Cr-Commit-Position: refs/heads/master@{#412852} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
