WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
100897
[V8] Unify the V8GCController visitors
https://bugs.webkit.org/show_bug.cgi?id=100897
Summary
[V8] Unify the V8GCController visitors
Adam Barth
Reported
2012-10-31 15:29:37 PDT
[V8] Unify the V8GCController visitors
Attachments
Patch
(11.12 KB, patch)
2012-10-31 15:32 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
patch (rebased onto bug 100707)
(11.27 KB, patch)
2012-10-31 15:37 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
Patch for landing
(10.69 KB, patch)
2012-11-01 06:24 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
Patch for landing
(10.68 KB, patch)
2012-11-01 07:19 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Adam Barth
Comment 1
2012-10-31 15:32:13 PDT
Created
attachment 171730
[details]
Patch
Adam Barth
Comment 2
2012-10-31 15:37:51 PDT
Created
attachment 171732
[details]
patch (rebased onto
bug 100707
)
Eric Seidel (no email)
Comment 3
2012-10-31 20:34:57 PDT
Comment on
attachment 171732
[details]
patch (rebased onto
bug 100707
) LGTM. Presumably you'll want to wait for haraken too.
Adam Barth
Comment 4
2012-10-31 22:54:49 PDT
@haraken: Thoughts?
Kentaro Hara
Comment 5
2012-11-01 00:48:15 PDT
Comment on
attachment 171732
[details]
patch (rebased onto
bug 100707
) View in context:
https://bugs.webkit.org/attachment.cgi?id=171732&action=review
LGTM with some nits.
> Source/WebCore/bindings/v8/V8GCController.cpp:176 > +class GCHandleVisitor : public v8::PersistentHandleVisitor {
Nit: I would prefer DOMWrapperVisitor than GCHandleVisitor.
> Source/WebCore/bindings/v8/V8GCController.cpp:178 > + virtual void VisitPersistentHandle(v8::Persistent<v8::Value> value, uint16_t classId) OVERRIDE
VisitDOMWrapper() or VisitDOMWrapperHandle() ?
> Source/WebCore/bindings/v8/V8GCController.cpp:220 > + } else { > + ASSERT(classId == v8DOMObjectClassId); > + m_grouper.addToGroup(type->opaqueRootForGC(object, wrapper), wrapper); > + }
} else if (classId == v8DOMObjectClassId) { m_grouper.addToGroup(type->opaqueRootForGC(object, wrapper), wrapper); } else { ASSERT_NOT_REACHED(); } might be better, to avoid executing m_grouper.addToGroup() for unexpected objects in a release build.
Adam Barth
Comment 6
2012-11-01 04:30:13 PDT
(In reply to
comment #5
)
> (From update of
attachment 171732
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=171732&action=review
> > > Source/WebCore/bindings/v8/V8GCController.cpp:178 > > + virtual void VisitPersistentHandle(v8::Persistent<v8::Value> value, uint16_t classId) OVERRIDE > > VisitDOMWrapper() or VisitDOMWrapperHandle() ?
This name comes from the V8 API. I'll make your other suggested changes, however. ;)
Kentaro Hara
Comment 7
2012-11-01 04:31:51 PDT
(In reply to
comment #6
)
> (In reply to
comment #5
) > > > + virtual void VisitPersistentHandle(v8::Persistent<v8::Value> value, uint16_t classId) OVERRIDE > > > > VisitDOMWrapper() or VisitDOMWrapperHandle() ? > > This name comes from the V8 API. I'll make your other suggested changes, however. ;)
Makes sense.
Adam Barth
Comment 8
2012-11-01 06:24:12 PDT
Created
attachment 171828
[details]
Patch for landing
WebKit Review Bot
Comment 9
2012-11-01 06:46:24 PDT
Comment on
attachment 171828
[details]
Patch for landing Rejecting
attachment 171828
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: ler.cpp:252: error: 'visitor' was not declared in this scope cc1plus: warnings being treated as errors Source/WebCore/bindings/v8/V8GCController.cpp: At global scope: Source/WebCore/bindings/v8/V8GCController.cpp:136: error: 'void WebCore::addImplicitReferencesForNodeWithEventListeners(WebCore::Node*, v8::Persistent<v8::Object>)' defined but not used make: *** [out/Release/obj.target/webcore_remaining/Source/WebCore/bindings/v8/V8GCController.o] Error 1 make: *** Waiting for unfinished jobs.... Full output:
http://queues.webkit.org/results/14561603
Adam Barth
Comment 10
2012-11-01 07:19:24 PDT
Created
attachment 171843
[details]
Patch for landing
WebKit Review Bot
Comment 11
2012-11-01 07:52:28 PDT
Comment on
attachment 171843
[details]
Patch for landing Clearing flags on attachment: 171843 Committed
r133169
: <
http://trac.webkit.org/changeset/133169
>
WebKit Review Bot
Comment 12
2012-11-01 07:52:32 PDT
All reviewed patches have been landed. Closing bug.
Kentaro Hara
Comment 13
2012-11-05 05:49:30 PST
BTW, classID should be stored not in global handles but in WrapperTypeInfo, shouldn't it? Then we can remove the code to set/get class IDs. If that's the case, I'll upload a patch. (Hopefully we want to eliminate a class_id_ field from global handles of V8, but it would be difficult for compatibility reasons.)
Adam Barth
Comment 14
2012-11-05 08:31:44 PST
> BTW, classID should be stored not in global handles but in WrapperTypeInfo, shouldn't it? Then we can remove the code to set/get class IDs. If that's the case, I'll upload a patch. (Hopefully we want to eliminate a class_id_ field from global handles of V8, but it would be difficult for compatibility reasons.)
We need to store the class ID in the handle, not in the WrapperTypeInfo. We use them to know that a handle has a WrapperTypeInfo field in the first place. There's lots of code that might open persistent V8 handles. When we enumerate the handles, we need to know whether the current handle is a DOM wrapper or some other kind of handle.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug