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

Issue 2687943004: Abstract out ThreadDebugger from V8PerIsolateData (Closed)

Created:
3 years, 10 months ago by adithyas
Modified:
3 years, 10 months ago
Reviewers:
haraken, dgozman, jbroman, Yuki
CC:
apavlov+blink_chromium.org, blink-reviews, blink-reviews-bindings_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Abstract out ThreadDebugger from V8PerIsolateData V8PerIsolateData holds an instance of ThreadDebugger, but does not need to know information about its interface. This can be abstracted out with V8PerIsolateData::Data and will make it easier to move V8PerIsolateData to platform/ (as ThreadDebugger is very tightly coupled with core). BUG=682322 Review-Url: https://codereview.chromium.org/2687943004 Cr-Commit-Position: refs/heads/master@{#450995} Committed: https://chromium.googlesource.com/chromium/src/+/d9471b0d6e0108c3303e9214daf0564c11eba611

Patch Set 1 #

Patch Set 2 : Reparent branch #

Patch Set 3 : Fix Windows Build Attempt #1 #

Patch Set 4 : Initialize HiddenValue and PrivateProperty in V8Initializer #

Total comments: 30

Patch Set 5 : Only abstract thread debugger #

Total comments: 4

Patch Set 6 : Fix style, add comment #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -41 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp View 1 2 3 4 4 chunks +12 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp View 1 2 3 4 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h View 1 2 3 4 5 5 chunks +13 lines, -6 lines 2 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp View 1 2 3 4 3 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/ThreadDebugger.h View 1 2 3 4 2 chunks +7 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 37 (23 generated)
adithyas
3 years, 10 months ago (2017-02-14 16:22:57 UTC) #12
jbroman
+haraken, who might want to weigh in on this bikeshed https://codereview.chromium.org/2687943004/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h File third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h (right): https://codereview.chromium.org/2687943004/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h#newcode94 ...
3 years, 10 months ago (2017-02-14 18:10:48 UTC) #14
haraken
https://codereview.chromium.org/2687943004/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h File third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h (right): https://codereview.chromium.org/2687943004/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h#newcode245 third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h:245: std::unique_ptr<Data> m_hiddenValue; On 2017/02/14 18:10:48, jbroman wrote: > V8HiddenValue ...
3 years, 10 months ago (2017-02-15 00:06:02 UTC) #15
jbroman
Alright. I've left some more comments about the ThreadDebugger part of this CL. https://codereview.chromium.org/2687943004/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp File ...
3 years, 10 months ago (2017-02-15 02:25:24 UTC) #16
Yuki
https://codereview.chromium.org/2687943004/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h File third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h (right): https://codereview.chromium.org/2687943004/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h#newcode56 third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h:56: static V8HiddenValue* from(v8::Isolate* isolate) { No need to expose ...
3 years, 10 months ago (2017-02-15 10:00:40 UTC) #18
adithyas
I reverted the changes to V8HiddenValue and V8PrivateProperty, the Data abstraction is only being used ...
3 years, 10 months ago (2017-02-15 18:12:13 UTC) #19
jbroman
lgtm https://codereview.chromium.org/2687943004/diff/80001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h File third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h (right): https://codereview.chromium.org/2687943004/diff/80001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h#newcode94 third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h:94: virtual ~Data(){}; super-nit: no semicolon after a function ...
3 years, 10 months ago (2017-02-15 18:39:09 UTC) #23
haraken
LGTM https://codereview.chromium.org/2687943004/diff/80001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h File third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h (right): https://codereview.chromium.org/2687943004/diff/80001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h#newcode92 third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h:92: class CORE_EXPORT Data { Add a comment and ...
3 years, 10 months ago (2017-02-16 00:27:10 UTC) #26
Yuki
LGTM.
3 years, 10 months ago (2017-02-16 07:12:10 UTC) #27
adithyas
https://codereview.chromium.org/2687943004/diff/80001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h File third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h (right): https://codereview.chromium.org/2687943004/diff/80001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h#newcode92 third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h:92: class CORE_EXPORT Data { On 2017/02/16 at 00:27:10, haraken ...
3 years, 10 months ago (2017-02-16 15:18:04 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2687943004/100001
3 years, 10 months ago (2017-02-16 15:19:21 UTC) #31
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/d9471b0d6e0108c3303e9214daf0564c11eba611
3 years, 10 months ago (2017-02-16 16:59:31 UTC) #34
dgozman
https://codereview.chromium.org/2687943004/diff/100001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h File third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h (right): https://codereview.chromium.org/2687943004/diff/100001/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h#newcode170 third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h:170: Data* threadDebugger(); Sorry for coming late, but I'm curios ...
3 years, 10 months ago (2017-02-18 06:11:36 UTC) #36
adithyas
3 years, 10 months ago (2017-02-21 15:43:04 UTC) #37
Message was sent while issue was closed.
https://codereview.chromium.org/2687943004/diff/100001/third_party/WebKit/Sou...
File third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h (right):

https://codereview.chromium.org/2687943004/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h:170: Data*
threadDebugger();
On 2017/02/18 at 06:11:36, dgozman wrote:
> Sorry for coming late, but I'm curios what are we trying to hide here? The
method is called |threadDebugger|, but returns some abstract data, which sounds
like we are tricking ourselves.
> If we introduce layering, can we have an actual abstraction so that anyone can
create an object which lifetime is coupled with isolate? I think current
solution is fighting with compiler/DEPS rules, but not the actual semantics.

You are correct, the current solution simply removes a dependency to core/
rather than actually abstracting away the object. Abstracting away these objects
with a map (like what Supplementable does) would be a cleaner solution. But, I
don't know if this is necessary considering there is only one object
(threadDebugger) that will be abstracted away by this. Members like
privateProperty and hiddenValue could be abstracted away too, but they are
accessed very frequently, so adding a map access to retrieve them might result
in a performance hit.

There was some bikeshedding earlier in this CL and the consensus was that the
Data abstraction was okay just for this case.

Powered by Google App Engine
This is Rietveld 408576698