Bug 74740

Summary: Remove unused ExceptionCode& argument from Element::setAttribute(QualifiedName)
Product: WebKit Reporter: Adam Klein <adamk>
Component: New BugsAssignee: Adam Klein <adamk>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, darin, ojan, rniwa, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Remove third arg
none
Patch for landing none

Description Adam Klein 2011-12-16 12:31:58 PST
Replace Element::setAttribute convenience overload with a default value of ASSERT_NO_EXCEPTION
Comment 1 Adam Klein 2011-12-16 12:33:21 PST
Created attachment 119651 [details]
Patch
Comment 2 Ryosuke Niwa 2011-12-19 15:40:42 PST
Comment on attachment 119651 [details]
Patch

Did you verify that all callers of setAttribute(const QualifiedName& name, const AtomicString& value) can assert no exceptions? We used to ignore exceptions before this patch.
Comment 3 Adam Klein 2011-12-19 15:43:18 PST
(In reply to comment #2)
> (From update of attachment 119651 [details])
> Did you verify that all callers of setAttribute(const QualifiedName& name, const AtomicString& value) can assert no exceptions? We used to ignore exceptions before this patch.

It's impossible for setAttribute(const QualifiedName&, const AtomicString&, ExceptionCode&) to throw an exception: the implementation in Element.cpp doesn't name the ExceptionCode argument and thus cannot possibly modify it.
Comment 4 Ryosuke Niwa 2011-12-19 15:45:23 PST
(In reply to comment #3)
> It's impossible for setAttribute(const QualifiedName&, const AtomicString&, ExceptionCode&) to throw an exception: the implementation in Element.cpp doesn't name the ExceptionCode argument and thus cannot possibly modify it.

Then why don't we get rid of the version that takes ExceptionCode& ?
Comment 5 Adam Klein 2011-12-19 16:15:14 PST
Created attachment 119939 [details]
Remove third arg
Comment 6 Adam Klein 2011-12-19 16:15:45 PST
(In reply to comment #4)
> (In reply to comment #3)
> > It's impossible for setAttribute(const QualifiedName&, const AtomicString&, ExceptionCode&) to throw an exception: the implementation in Element.cpp doesn't name the ExceptionCode argument and thus cannot possibly modify it.
> 
> Then why don't we get rid of the version that takes ExceptionCode& ?

Ha, good point, done!
Comment 7 Early Warning System Bot 2011-12-19 16:40:52 PST
Comment on attachment 119939 [details]
Remove third arg

Attachment 119939 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/10936196
Comment 8 Adam Klein 2011-12-19 17:12:22 PST
Created attachment 119955 [details]
Patch for landing
Comment 9 Adam Klein 2011-12-19 17:13:30 PST
Had to update a few callers in JSC SVG bindings, and one in Mac editing code.
Comment 10 WebKit Review Bot 2011-12-19 19:42:39 PST
Comment on attachment 119955 [details]
Patch for landing

Clearing flags on attachment: 119955

Committed r103296: <http://trac.webkit.org/changeset/103296>
Comment 11 WebKit Review Bot 2011-12-19 19:42:44 PST
All reviewed patches have been landed.  Closing bug.