Bug 74740 - Remove unused ExceptionCode& argument from Element::setAttribute(QualifiedName)
Summary: Remove unused ExceptionCode& argument from Element::setAttribute(QualifiedName)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Klein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-16 12:31 PST by Adam Klein
Modified: 2011-12-19 19:42 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.41 KB, patch)
2011-12-16 12:33 PST, Adam Klein
no flags Details | Formatted Diff | Diff
Remove third arg (10.27 KB, patch)
2011-12-19 16:15 PST, Adam Klein
no flags Details | Formatted Diff | Diff
Patch for landing (14.10 KB, patch)
2011-12-19 17:12 PST, Adam Klein
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.