Bug 29888 - [V8] XMLHttpRequest attribute event listeners are always created as object listeners.
Summary: [V8] XMLHttpRequest attribute event listeners are always created as object li...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dimitri Glazkov (Google)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-29 10:45 PDT by Dimitri Glazkov (Google)
Modified: 2009-09-29 12:27 PDT (History)
1 user (show)

See Also:


Attachments
Fix attribute event listeners in XHR, v1. (6.43 KB, patch)
2009-09-29 11:08 PDT, Dimitri Glazkov (Google)
no flags Details | Formatted Diff | Diff
Fix attribute event listeners in XHR, v2. (6.74 KB, patch)
2009-09-29 11:47 PDT, Dimitri Glazkov (Google)
fishd: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri Glazkov (Google) 2009-09-29 10:45:41 PDT
The recent event listener refactoring revealed a bug, where we never explicitly say if an event listener is attribute for XHR. This leads to attribute listeners always created as object listeners, and thus never being cleared when setting new attribute listener. Bad.
Comment 1 Dimitri Glazkov (Google) 2009-09-29 11:08:49 PDT
Created attachment 40312 [details]
Fix attribute event listeners in XHR, v1.

 WebCore/ChangeLog                                  |   14 ++++++++++++
 .../bindings/v8/custom/V8XMLHttpRequestCustom.cpp  |   22 ++++++++++----------
 2 files changed, 25 insertions(+), 11 deletions(-)
Comment 2 Vitaly Repeshko 2009-09-29 11:18:28 PDT
(In reply to comment #1)
> Created an attachment (id=40312) [details]
> Fix attribute event listeners in XHR, v1.
> 
>  WebCore/ChangeLog                                  |   14 ++++++++++++
>  .../bindings/v8/custom/V8XMLHttpRequestCustom.cpp  |   22 ++++++++++----------
>  2 files changed, 25 insertions(+), 11 deletions(-)

LGTM.
Comment 3 Dimitri Glazkov (Google) 2009-09-29 11:47:10 PDT
Created attachment 40314 [details]
Fix attribute event listeners in XHR, v2.

 WebCore/ChangeLog                                  |   14 +++++++++++
 .../bindings/v8/custom/V8XMLHttpRequestCustom.cpp  |   25 +++++++++++--------
 2 files changed, 28 insertions(+), 11 deletions(-)
Comment 4 Dimitri Glazkov (Google) 2009-09-29 11:47:45 PDT
bools == ew. Used enums instead.
Comment 5 Vitaly Repeshko 2009-09-29 11:51:06 PDT
(In reply to comment #4)
> bools == ew. Used enums instead.

Enum names are misleading here since V8ObjectEventListener can be an attribute listener.
Comment 6 Dimitri Glazkov (Google) 2009-09-29 12:27:44 PDT
Landed as http://trac.webkit.org/changeset/48889.