WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
29825
[V8] Refactored V8 event listeners.
https://bugs.webkit.org/show_bug.cgi?id=29825
Summary
[V8] Refactored V8 event listeners.
Vitaly Repeshko
Reported
2009-09-28 14:09:26 PDT
[V8] Refactored V8 event listeners.
Attachments
patch: WIP
(145.65 KB, patch)
2009-09-28 14:29 PDT
,
Vitaly Repeshko
no flags
Details
Formatted Diff
Diff
updated patch
(145.45 KB, patch)
2009-09-30 04:43 PDT
,
Vitaly Repeshko
dglazkov
: review-
Details
Formatted Diff
Diff
updated patch v2
(148.67 KB, patch)
2009-09-30 11:41 PDT
,
Vitaly Repeshko
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Vitaly Repeshko
Comment 1
2009-09-28 14:29:18 PDT
Created
attachment 40260
[details]
patch: WIP Dimitri, please have a look. This is still WIP (testing lazy listeners) and depends on
http://code.google.com/p/v8/source/detail?r=2980
(should be in V8 trunk this week), but I think it's almost done.
Ojan Vafai
Comment 2
2009-09-28 14:36:52 PDT
drive-by comment: Is there any way to test for leaks so this doesn't regress?
Sam Weinig
Comment 3
2009-09-28 14:38:06 PDT
If this is still a WIP, this should not be marked for review. One question though, why are the attribute event listeners marked as OnProto? This does not match the JSC bindings. Are there tests that indicate it should be this way?
Vitaly Repeshko
Comment 4
2009-09-28 14:40:03 PDT
(In reply to
comment #2
)
> drive-by comment: Is there any way to test for leaks so this doesn't regress?
Yes, for fixed leaks I'll extend src/webkit/tools/test_shell/listener_leak_test.cc.
Vitaly Repeshko
Comment 5
2009-09-28 14:46:37 PDT
(In reply to
comment #3
)
> If this is still a WIP, this should not be marked for review. One question > though, why are the attribute event listeners marked as OnProto? This does not > match the JSC bindings. Are there tests that indicate it should be this way?
They are marked with v8onproto attribute because old custom V8 code used to look up the holder of the property in prototype chain. I tried to copy the old behavior. I'll double-check if this is in fact needed. If JSC doesn't need this, chances are V8 doesn't need either.
Dimitri Glazkov (Google)
Comment 6
2009-09-28 20:00:13 PDT
Comment on
attachment 40260
[details]
patch: WIP +1 on investigating v8onproto.
Vitaly Repeshko
Comment 7
2009-09-30 04:43:11 PDT
Created
attachment 40360
[details]
updated patch Notification does not require v8onproto. Removed. Remaining memory leaks in lazy listeners are unrelated to handles and are caused by Function cache for functions created by FunctionTemplate. I'm going to fix usages of FunctionTemplate in V8 bindings in a separate patch.
Dimitri Glazkov (Google)
Comment 8
2009-09-30 10:26:50 PDT
Comment on
attachment 40360
[details]
updated patch This is super-awesome. I only have style nits. I would really like to use enums for isAttribute params in getEventListener. That should clarify the call sites.
> + V8Proxy* proxy = V8Proxy::retrieve(worker->scriptExecutionContext()); > + if (proxy) { > + return findOnly ? V8EventListenerList::findWrapper(value, isAttribute) : V8EventListenerList::findOrCreateWrapper<V8EventListener>(proxy->frame(), value, isAttribute); > + }
Don't need braces here.
> + if (proxy) { > + return findOnly ? V8EventListenerList::findWrapper(value, isAttribute) : V8EventListenerList::findOrCreateWrapper<V8EventListener>(proxy->frame(), value, isAttribute); > + }
Ditto.
> +v8::Handle<v8::String> V8HiddenPropertyName::listener() > +{ > + static v8::Persistent<v8::String>* string = createString("WebCore::V8HiddenPropertyName::listener"); > +
no line break here.
> + return *string; > +} > + > +v8::Handle<v8::String> V8HiddenPropertyName::attributeListener() > +{ > + static v8::Persistent<v8::String>* string = createString("WebCore::V8HiddenPropertyName::attributeListener");
Ditto.
> +void V8Proxy::disconnectEventListeners() > +{ > +} > +
Why is this here? Can we just get rid of it?
Vitaly Repeshko
Comment 9
2009-09-30 11:41:54 PDT
Created
attachment 40386
[details]
updated patch v2
Dimitri Glazkov (Google)
Comment 10
2009-10-01 09:44:25 PDT
Comment on
attachment 40386
[details]
updated patch v2 r=me.
WebKit Commit Bot
Comment 11
2009-10-01 10:02:02 PDT
Comment on
attachment 40386
[details]
updated patch v2 Clearing flags on attachment: 40386 Committed
r48978
: <
http://trac.webkit.org/changeset/48978
>
WebKit Commit Bot
Comment 12
2009-10-01 10:02:06 PDT
All reviewed patches have been landed. Closing bug.
Eric Seidel (no email)
Comment 13
2009-10-01 18:01:49 PDT
See
http://code.google.com/p/chromium/issues/detail?id=23597
I guess this caused some sort of regression. I'm happy to roll this out if that's what's desired. bugzilla-tool rollout 48978 will prepare the rollout. bugzilla-tool rollout 48978 --complete-rollout --force-clean would do the full rollout including testing to make sure it builds/passes tests and updating the bug.
Dimitri Glazkov (Google)
Comment 14
2009-10-01 20:28:24 PDT
Let's give vitalyr a chance to fix this. Sadness that it broke.
Vitaly Repeshko
Comment 15
2009-10-02 06:43:14 PDT
(In reply to
comment #14
)
> Let's give vitalyr a chance to fix this. Sadness that it broke.
Reverting this patch doesn't fix the breakage. Please see discussion in
http://code.google.com/p/chromium/issues/detail?id=23597
.
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