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

Issue 26792002: Reland: Reland: Implement new Blink IDL attribute [SetReference] (Closed)

Created:
7 years, 2 months ago by kouhei (in TOK)
Modified:
7 years, 1 month ago
CC:
blink-reviews, Nils Barth (inactive), kojih, jsbell+bindings_chromium.org, eae+blinkwatch, abarth-chromium, marja+watch_chromium.org, dglazkov+blink, adamk+blink_chromium.org, Nate Chapin, Inactive
Visibility:
Public.

Description

Reland: Reland: Implement new Blink IDL attribute [SetReference] SetReference is a new Blink IDL attribute which can be used to specify dependency from a wrapper to another. This is implemented by calling v8::Isolate::SetReference on minor GC prologues. This has a lower overhead compared to old technique using SetHiddenValueTo. This patch also modifies DOMDataStore::Current to support call outside any active context. [Reland] Marked NodeFilter dependent. BUG=307341 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161018

Patch Set 1 #

Total comments: 10

Patch Set 2 : toV8Persistent #

Patch Set 3 : nits #

Patch Set 4 : call opaqueRootForGC from resolveWrapperReachability #

Patch Set 5 : codegen impl #

Total comments: 1

Patch Set 6 : styles #

Patch Set 7 : reupload #

Total comments: 8

Patch Set 8 : nits #

Patch Set 9 : setWrapperReference #

Patch Set 10 : setWrapperReference_reupl #

Total comments: 9

Patch Set 11 : SetReference #

Total comments: 5

Patch Set 12 : nits #

Patch Set 13 : rebased #

Patch Set 14 : null context fix #

Patch Set 15 : add repro test #

Patch Set 16 : rebased #

Total comments: 2

Patch Set 17 : create/check wrapper on creationContext #

Total comments: 14

Patch Set 18 : remove tests #

Patch Set 19 : fix compile err #

Patch Set 20 : mark NodeFilter Dependent #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -178 lines) Patch
M Source/bindings/bindings.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +0 lines, -2 lines 0 comments Download
M Source/bindings/scripts/IDLAttributes.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/scripts/code_generator_v8.pm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +38 lines, -15 lines 0 comments Download
M Source/bindings/tests/idls/TestInterface.idl View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +16 lines, -1 line 0 comments Download
M Source/bindings/v8/DOMDataStore.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +24 lines, -0 lines 0 comments Download
M Source/bindings/v8/DOMWrapperMap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/v8/UnsafePersistent.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8DOMWrapper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +35 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8DOMWrapper.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -35 lines 0 comments Download
M Source/bindings/v8/V8GCController.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/WrapperTypeInfo.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +12 lines, -6 lines 0 comments Download
D Source/bindings/v8/custom/V8NodeIteratorCustom.cpp View 1 2 3 4 1 chunk +0 lines, -54 lines 0 comments Download
M Source/bindings/v8/custom/V8NodeListCustom.cpp View 1 2 3 1 chunk +11 lines, -6 lines 0 comments Download
D Source/bindings/v8/custom/V8TreeWalkerCustom.cpp View 1 2 3 4 1 chunk +0 lines, -54 lines 0 comments Download
M Source/core/dom/NodeFilter.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/NodeIterator.idl View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/TreeWalker.idl View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 56 (0 generated)
kouhei (in TOK)
haraken: PTAL@ Source/bindings/v8/custom/V8NodeIteratorCustom.cpp Does this make sense to you? Obviously I need to this in ...
7 years, 2 months ago (2013-10-10 05:12:14 UTC) #1
haraken
The approach looks good. https://codereview.chromium.org/26792002/diff/1/Source/bindings/scripts/code_generator_v8.pm File Source/bindings/scripts/code_generator_v8.pm (right): https://codereview.chromium.org/26792002/diff/1/Source/bindings/scripts/code_generator_v8.pm#newcode117 Source/bindings/scripts/code_generator_v8.pm:117: use Data::Dumper; Remove this. https://codereview.chromium.org/26792002/diff/1/Source/bindings/v8/ScriptWrappable.h ...
7 years, 2 months ago (2013-10-10 06:08:32 UTC) #2
kouhei (in TOK)
This time with toV8Persistent impl. I'm done with the cpp code, so now I'm going ...
7 years, 2 months ago (2013-10-10 06:20:02 UTC) #3
kouhei (in TOK)
haraken: PTAL. I added v8codegen impl.
7 years, 2 months ago (2013-10-15 04:45:39 UTC) #4
jochen (gone - plz use gerrit)
https://codereview.chromium.org/26792002/diff/15001/Source/bindings/scripts/code_generator_v8.pm File Source/bindings/scripts/code_generator_v8.pm (right): https://codereview.chromium.org/26792002/diff/15001/Source/bindings/scripts/code_generator_v8.pm#newcode917 Source/bindings/scripts/code_generator_v8.pm:917: inline UnsafePersistent<v8::Object> toV8Persistent(${nativeType}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) we ...
7 years, 2 months ago (2013-10-15 05:26:42 UTC) #5
haraken
- Looks like the diff in the patch set 6 is broken. Would you reupload? ...
7 years, 2 months ago (2013-10-15 05:31:58 UTC) #6
kouhei (in TOK)
On 2013/10/15 05:26:42, jochen wrote: > https://codereview.chromium.org/26792002/diff/15001/Source/bindings/scripts/code_generator_v8.pm > File Source/bindings/scripts/code_generator_v8.pm (right): > > https://codereview.chromium.org/26792002/diff/15001/Source/bindings/scripts/code_generator_v8.pm#newcode917 > ...
7 years, 2 months ago (2013-10-15 05:35:22 UTC) #7
kouhei (in TOK)
On 2013/10/15 05:31:58, haraken wrote: > - Looks like the diff in the patch set ...
7 years, 2 months ago (2013-10-15 05:35:47 UTC) #8
haraken
Would you add a test case for [ReachableTo] to TestInterface.idl? https://codereview.chromium.org/26792002/diff/49001/Source/bindings/scripts/code_generator_v8.pm File Source/bindings/scripts/code_generator_v8.pm (right): https://codereview.chromium.org/26792002/diff/49001/Source/bindings/scripts/code_generator_v8.pm#newcode457 ...
7 years, 2 months ago (2013-10-15 05:48:28 UTC) #9
kouhei (in TOK)
> Would you add a test case for [ReachableTo] to TestInterface.idl? Ack. https://codereview.chromium.org/26792002/diff/49001/Source/bindings/scripts/code_generator_v8.pm File Source/bindings/scripts/code_generator_v8.pm ...
7 years, 2 months ago (2013-10-15 05:54:10 UTC) #10
kouhei (in TOK)
https://codereview.chromium.org/26792002/diff/49001/Source/bindings/scripts/code_generator_v8.pm File Source/bindings/scripts/code_generator_v8.pm (right): https://codereview.chromium.org/26792002/diff/49001/Source/bindings/scripts/code_generator_v8.pm#newcode457 Source/bindings/scripts/code_generator_v8.pm:457: sub NeedResolveWrapperReachability On 2013/10/15 05:54:11, kouhei wrote: > On ...
7 years, 2 months ago (2013-10-15 06:03:08 UTC) #11
kouhei (in TOK)
> I agree with jochen that using UnsafePersistent is ugly. On the other hand, as ...
7 years, 2 months ago (2013-10-15 06:07:32 UTC) #12
marja
On 2013/10/15 06:07:32, kouhei wrote: > > I agree with jochen that using UnsafePersistent is ...
7 years, 2 months ago (2013-10-15 13:22:51 UTC) #13
marja
Another comment: The name "ReachableTo" doesn't make sense to me. "ReachableFrom" does, but this one ...
7 years, 2 months ago (2013-10-15 13:26:56 UTC) #14
kouhei (in TOK)
On 2013/10/15 13:22:51, marja wrote: > On 2013/10/15 06:07:32, kouhei wrote: > > > I ...
7 years, 2 months ago (2013-10-16 04:10:50 UTC) #15
haraken
https://codereview.chromium.org/26792002/diff/85001/Source/bindings/scripts/code_generator_v8.pm File Source/bindings/scripts/code_generator_v8.pm (right): https://codereview.chromium.org/26792002/diff/85001/Source/bindings/scripts/code_generator_v8.pm#newcode490 Source/bindings/scripts/code_generator_v8.pm:490: if(! DOMDataStore::containsWrapper<${reachableToV8Type}>(${reachableToName}, isolate)) Nit: Unnecessary space after '!'. https://codereview.chromium.org/26792002/diff/85001/Source/bindings/tests/results/V8TestInterface.cpp ...
7 years, 2 months ago (2013-10-16 04:46:37 UTC) #16
haraken
https://codereview.chromium.org/26792002/diff/85001/Source/bindings/v8/DOMDataStore.h File Source/bindings/v8/DOMDataStore.h (right): https://codereview.chromium.org/26792002/diff/85001/Source/bindings/v8/DOMDataStore.h#newcode144 Source/bindings/v8/DOMDataStore.h:144: inline void setReferenceFrom(const v8::Persistent<v8::Object>& parent, T* child, v8::Isolate* isolate) ...
7 years, 2 months ago (2013-10-16 05:37:30 UTC) #17
marja
On 2013/10/16 04:10:50, kouhei wrote: > I understand that "CanReach" sounds more natural, but I ...
7 years, 2 months ago (2013-10-16 15:43:52 UTC) #18
marja
On 2013/10/16 05:37:30, haraken wrote: > marja, dan, jochen: If we have unique pointers for ...
7 years, 2 months ago (2013-10-16 16:06:27 UTC) #19
marja
Also, fyi, the templatized SetReference et al: https://codereview.chromium.org/27512003/
7 years, 2 months ago (2013-10-16 16:09:13 UTC) #20
haraken
Thanks marja. Given it will take time to implement Unique handles in v8 (or OwnPersistent ...
7 years, 2 months ago (2013-10-17 00:47:30 UTC) #21
kouhei (in TOK)
Thanks marja! I'll remove the casts once its landed. I renamed [ReachableTo] to [SetReference] in ...
7 years, 2 months ago (2013-10-17 02:30:08 UTC) #22
haraken
LGTM. Please wait for marja's approval. Looking at this CL, I'm pretty sure it's time ...
7 years, 2 months ago (2013-10-17 03:28:21 UTC) #23
kouhei (in TOK)
haraken: Thanks for review! marja: Would you take a look? https://codereview.chromium.org/26792002/diff/98001/Source/bindings/tests/idls/TestInterface.idl File Source/bindings/tests/idls/TestInterface.idl (right): https://codereview.chromium.org/26792002/diff/98001/Source/bindings/tests/idls/TestInterface.idl#newcode37 ...
7 years, 2 months ago (2013-10-17 05:17:22 UTC) #24
marja
lgtm
7 years, 2 months ago (2013-10-17 07:59:46 UTC) #25
kouhei (in TOK)
On 2013/10/17 07:59:46, marja wrote: > lgtm Thanks for the review!
7 years, 2 months ago (2013-10-17 08:04:36 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/26792002/106001
7 years, 2 months ago (2013-10-17 08:18:07 UTC) #27
commit-bot: I haz the power
Failed to apply patch for Source/bindings/scripts/code_generator_v8.pm: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 2 months ago (2013-10-17 08:18:14 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/26792002/113001
7 years, 2 months ago (2013-10-17 08:37:22 UTC) #29
commit-bot: I haz the power
Change committed as 159861
7 years, 2 months ago (2013-10-17 11:32:01 UTC) #30
marja
Thanks for changing the name, SetReference is much better :)
7 years, 2 months ago (2013-10-17 13:32:20 UTC) #31
eseidel
Karen says this is causing Canary to blow up in all sorts of ways and ...
7 years, 2 months ago (2013-10-19 20:32:43 UTC) #32
kouhei (in TOK)
haraken: PTAL again. I'm trying to add a repro test for the revert, but I'd ...
7 years, 2 months ago (2013-10-25 01:56:53 UTC) #33
kouhei (in TOK)
> I'm trying to add a repro test for the revert, but I'd appreciate it ...
7 years, 2 months ago (2013-10-25 02:07:25 UTC) #34
kouhei (in TOK)
On 2013/10/25 02:07:25, kouhei wrote: > > I'm trying to add a repro test for ...
7 years, 1 month ago (2013-10-25 03:11:39 UTC) #35
haraken
> BTW, the issue we discussed offline about non-mainWorld wrappers incorrectly > being GC-ed should ...
7 years, 1 month ago (2013-10-25 05:21:22 UTC) #36
haraken
https://codereview.chromium.org/26792002/diff/303001/Source/core/testing/Internals.cpp File Source/core/testing/Internals.cpp (right): https://codereview.chromium.org/26792002/diff/303001/Source/core/testing/Internals.cpp#newcode2292 Source/core/testing/Internals.cpp:2292: v8::V8::IdleNotification(largeEnoughValueToTriggerMajorGC); This looks fragile. Probably you can use V8GCController::collectGarbage ...
7 years, 1 month ago (2013-10-25 08:54:11 UTC) #37
kouhei (in TOK)
On 2013/10/25 08:54:11, haraken wrote: > https://codereview.chromium.org/26792002/diff/303001/Source/core/testing/Internals.cpp > File Source/core/testing/Internals.cpp (right): > > https://codereview.chromium.org/26792002/diff/303001/Source/core/testing/Internals.cpp#newcode2292 > ...
7 years, 1 month ago (2013-10-28 03:36:49 UTC) #38
kouhei (in TOK)
On 2013/10/25 02:07:25, kouhei wrote: > > I'm trying to add a repro test for ...
7 years, 1 month ago (2013-10-28 08:48:15 UTC) #39
kouhei (in TOK)
On 2013/10/28 08:48:15, kouhei wrote: > On 2013/10/25 02:07:25, kouhei wrote: > > > I'm ...
7 years, 1 month ago (2013-10-29 00:05:59 UTC) #40
haraken
https://codereview.chromium.org/26792002/diff/463001/Source/bindings/tests/results/V8TestInterface.cpp File Source/bindings/tests/results/V8TestInterface.cpp (right): https://codereview.chromium.org/26792002/diff/463001/Source/bindings/tests/results/V8TestInterface.cpp#newcode796 Source/bindings/tests/results/V8TestInterface.cpp:796: V8WrapperInstantiationScope scope(creationContext, isolate); You can move this into the ...
7 years, 1 month ago (2013-10-29 01:14:52 UTC) #41
kouhei (in TOK)
I removed the LayoutTest from offline discussion with haraken. It seems dangerous to rely on ...
7 years, 1 month ago (2013-10-29 04:19:57 UTC) #42
haraken
LGTM
7 years, 1 month ago (2013-10-29 04:22:19 UTC) #43
kouhei (in TOK)
Thanks for review!
7 years, 1 month ago (2013-10-29 04:23:30 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/26792002/563001
7 years, 1 month ago (2013-10-29 04:23:30 UTC) #45
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-10-29 04:51:38 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/26792002/733001
7 years, 1 month ago (2013-10-29 06:04:06 UTC) #47
commit-bot: I haz the power
Change committed as 160800
7 years, 1 month ago (2013-10-29 07:05:28 UTC) #48
kouhei (in TOK)
Quick fix. Marked NodeFilter as Dependent. haraken: r?
7 years, 1 month ago (2013-10-31 02:29:47 UTC) #49
haraken
LGTM.
7 years, 1 month ago (2013-10-31 02:33:48 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/26792002/823001
7 years, 1 month ago (2013-10-31 02:34:01 UTC) #51
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 1 month ago (2013-10-31 03:02:58 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/26792002/823001
7 years, 1 month ago (2013-10-31 03:04:29 UTC) #53
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_lint, webkit_python_tests, webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=10502
7 years, 1 month ago (2013-10-31 03:40:36 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/26792002/823001
7 years, 1 month ago (2013-10-31 04:56:21 UTC) #55
commit-bot: I haz the power
7 years, 1 month ago (2013-10-31 04:56:56 UTC) #56
Message was sent while issue was closed.
Change committed as 161018

Powered by Google App Engine
This is Rietveld 408576698