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

Issue 14443007: Get rid of usages of ScriptWrappable::wrapper(). (Closed)

Created:
7 years, 8 months ago by marja
Modified:
7 years, 7 months ago
CC:
blink-reviews, Nate Chapin, abarth-chromium
Visibility:
Public.

Description

Get rid of usages of ScriptWrappable::wrapper(). This is needed for getting rid of Persistent handle copying, as we're going to remove the copy constructor (see bug for more information). If we need to pass back a Persistent by reference in the V8 API, we can normally just pass back a Persistent we hold. ScriptWrappable is problematic, because it does not hold a Persistent, but instead stores the raw pointer. Added UnsafePersistent to make the conversion from the raw pointer to a Persistent explicit. BUG=236290 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=149585

Patch Set 1 #

Total comments: 8

Patch Set 2 : Code review (haraken) #

Patch Set 3 : fixed version #

Patch Set 4 : . #

Patch Set 5 : UnsafePersistent #

Total comments: 8

Patch Set 6 : code review (dcarney) #

Patch Set 7 : assert that no gc happened during the UnsafePersistent lifetime #

Patch Set 8 : second thoughts, no asserting yet. #

Patch Set 9 : rebased #

Total comments: 9

Patch Set 10 : Code review (abarth) #

Patch Set 11 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -81 lines) Patch
M Source/bindings/bindings.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/ScriptWrappable.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -0 lines 0 comments Download
A + Source/bindings/v8/UnsafePersistent.h View 1 2 3 4 5 6 7 8 9 1 chunk +22 lines, -25 lines 0 comments Download
M Source/bindings/v8/V8GCController.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +59 lines, -56 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
marja
dcarney, ptal http://knowyourmeme.com/photos/234765-i-have-no-idea-what-im-doing https://codereview.chromium.org/14443007/diff/1/Source/bindings/v8/V8GCController.cpp File Source/bindings/v8/V8GCController.cpp (right): https://codereview.chromium.org/14443007/diff/1/Source/bindings/v8/V8GCController.cpp#newcode147 Source/bindings/v8/V8GCController.cpp:147: void gcTree(v8::Isolate* isolate, Node* startNode) Needed ...
7 years, 8 months ago (2013-04-26 13:38:51 UTC) #1
haraken
https://codereview.chromium.org/14443007/diff/1/Source/bindings/v8/ScriptWrappable.h File Source/bindings/v8/ScriptWrappable.h (right): https://codereview.chromium.org/14443007/diff/1/Source/bindings/v8/ScriptWrappable.h#newcode157 Source/bindings/v8/ScriptWrappable.h:157: friend class MinorGCWrapperVisitor; // For calling rawWrapper(). Is this ...
7 years, 8 months ago (2013-04-26 13:42:22 UTC) #2
marja
... and I forgot to say that this patch applies on top of https://codereview.chromium.org/13975005/ . ...
7 years, 8 months ago (2013-04-26 13:48:17 UTC) #3
haraken
> On 2013/04/26 13:42:23, haraken wrote: > > How many places do you think we ...
7 years, 8 months ago (2013-04-26 13:51:12 UTC) #4
dcarney
On 2013/04/26 13:51:12, haraken wrote: > > On 2013/04/26 13:42:23, haraken wrote: > > > ...
7 years, 8 months ago (2013-04-26 14:05:59 UTC) #5
haraken
> We are not going to implement PassHandle for Persistent. I think rawWrapper > should ...
7 years, 8 months ago (2013-04-26 14:14:17 UTC) #6
dcarney
> Hmm, but then we have to guarantee that GC never happens while we're holding ...
7 years, 8 months ago (2013-04-26 14:15:28 UTC) #7
haraken
> no, a v8::internal::Object* can be relocated, but not a v8::Object* Ah, got it. Then, ...
7 years, 8 months ago (2013-04-26 14:19:02 UTC) #8
dcarney
On 2013/04/26 14:19:02, haraken wrote: > > no, a v8::internal::Object* can be relocated, but not ...
7 years, 8 months ago (2013-04-26 14:26:13 UTC) #9
haraken
Understood. However, I still think that the programming pattern is too hard to understand. If ...
7 years, 8 months ago (2013-04-26 14:30:14 UTC) #10
marja
I think a fundamental problem is that Handle<T> is T*, internal::Handle<internal::T> is T**, and still ...
7 years, 8 months ago (2013-04-26 14:33:24 UTC) #11
abarth-chromium
It would be nice if the description contained more information about this CL. Why are ...
7 years, 8 months ago (2013-04-26 22:13:20 UTC) #12
dcarney
lgtm, but let haraken sign off on it first https://codereview.chromium.org/14443007/diff/16001/Source/bindings/v8/UnsafePersistent.h File Source/bindings/v8/UnsafePersistent.h (right): https://codereview.chromium.org/14443007/diff/16001/Source/bindings/v8/UnsafePersistent.h#newcode55 Source/bindings/v8/UnsafePersistent.h:55: ...
7 years, 7 months ago (2013-04-29 10:33:51 UTC) #13
haraken
https://codereview.chromium.org/14443007/diff/16001/Source/bindings/v8/UnsafePersistent.h File Source/bindings/v8/UnsafePersistent.h (right): https://codereview.chromium.org/14443007/diff/16001/Source/bindings/v8/UnsafePersistent.h#newcode41 Source/bindings/v8/UnsafePersistent.h:41: // the UnsafePersistent is alive or 2) when there ...
7 years, 7 months ago (2013-04-29 10:42:17 UTC) #14
marja
Thanks for comments! abarth: Could you have a look at the new version, haraken told ...
7 years, 7 months ago (2013-04-29 12:02:07 UTC) #15
abarth-chromium
LGTM This CL is kind of crazy, but it looks like it's moving us in ...
7 years, 7 months ago (2013-04-29 17:47:33 UTC) #16
marja
Thanks for review! https://codereview.chromium.org/14443007/diff/31001/Source/bindings/v8/UnsafePersistent.h File Source/bindings/v8/UnsafePersistent.h (right): https://codereview.chromium.org/14443007/diff/31001/Source/bindings/v8/UnsafePersistent.h#newcode44 Source/bindings/v8/UnsafePersistent.h:44: // TODO: assert that GC doesn't ...
7 years, 7 months ago (2013-04-30 08:55:50 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/marja@chromium.org/14443007/40001
7 years, 7 months ago (2013-05-02 09:47:19 UTC) #18
commit-bot: I haz the power
7 years, 7 months ago (2013-05-02 10:12:17 UTC) #19
Message was sent while issue was closed.
Change committed as 149585

Powered by Google App Engine
This is Rietveld 408576698