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

Issue 1967793004: Change base class of V8SamplingProfiler to AsyncEnabledStateObserver. (Closed)

Created:
4 years, 7 months ago by lpy
Modified:
4 years, 7 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, jam, darin-cc_chromium.org, devtools-reviews_chromium.org, mkwst+moarreviews-renderer_chromium.org, pfeldman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change base class of V8SamplingProfiler to AsyncEnabledStateObserver. Currently V8SamplingProfiler is a subclass of EnabledStateObserver, however EnabledStateObserver is not thread safe becuase OnTraceLog{Dis,En}abled get called in different thread which will become a use-after-free case when observer gets deleted in another thread. This patch changes base class of V8SamplingProfiler to AsyncEnabledStateObserver since AsyncEnabledStateObserver will post these two calls to the same thread where observer was added. BUG=611027 Committed: https://crrev.com/3d1573d4df84687881d4cfe8e8dd6391b99f28e2 Cr-Commit-Position: refs/heads/master@{#393260}

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : Address alph's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -13 lines) Patch
M content/renderer/devtools/v8_sampling_profiler.h View 1 2 3 chunks +2 lines, -3 lines 0 comments Download
M content/renderer/devtools/v8_sampling_profiler.cc View 1 2 3 chunks +6 lines, -10 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
lpy
PTAL.
4 years, 7 months ago (2016-05-11 21:57:59 UTC) #2
alph
https://codereview.chromium.org/1967793004/diff/20001/content/renderer/devtools/v8_sampling_profiler.cc File content/renderer/devtools/v8_sampling_profiler.cc (right): https://codereview.chromium.org/1967793004/diff/20001/content/renderer/devtools/v8_sampling_profiler.cc#newcode629 content/renderer/devtools/v8_sampling_profiler.cc:629: task_runner_->PostTask(FROM_HERE, Why do we need to post another task? ...
4 years, 7 months ago (2016-05-11 22:39:51 UTC) #4
lpy
Thanks, I updated the CL. https://codereview.chromium.org/1967793004/diff/20001/content/renderer/devtools/v8_sampling_profiler.cc File content/renderer/devtools/v8_sampling_profiler.cc (right): https://codereview.chromium.org/1967793004/diff/20001/content/renderer/devtools/v8_sampling_profiler.cc#newcode629 content/renderer/devtools/v8_sampling_profiler.cc:629: task_runner_->PostTask(FROM_HERE, On 2016/05/11 22:39:51, ...
4 years, 7 months ago (2016-05-11 23:01:52 UTC) #5
alph
lgtm
4 years, 7 months ago (2016-05-11 23:29:33 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1967793004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1967793004/40001
4 years, 7 months ago (2016-05-12 15:56:09 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-05-12 16:00:01 UTC) #9
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/3d1573d4df84687881d4cfe8e8dd6391b99f28e2 Cr-Commit-Position: refs/heads/master@{#393260}
4 years, 7 months ago (2016-05-12 16:01:23 UTC) #11
Primiano Tucci (use gerrit)
non-owner LGTM. Maybe you can add a ThreadChecker to document/ensure it gets called on the ...
4 years, 7 months ago (2016-05-13 12:59:12 UTC) #12
lpy
4 years, 7 months ago (2016-05-13 20:24:58 UTC) #13
Message was sent while issue was closed.
On 2016/05/13 12:59:12, Primiano Tucci wrote:
> non-owner LGTM. Maybe you can add a ThreadChecker to document/ensure it gets
> called on the right thread.
> Not strong on this suggestion, I'll leave it to alph.

Thanks for the advice, sounds good to me.

Powered by Google App Engine
This is Rietveld 408576698