Bug 16691 - Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)
Summary: Use real JS objects for the rest of the DOMExceptions (EventException, RangeE...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Sam Weinig
Depends on:
Reported: 2008-01-01 01:24 PST by Sam Weinig
Modified: 2008-01-01 21:47 PST (History)
0 users

See Also:

patch (116.50 KB, patch)
2008-01-01 15:59 PST, Sam Weinig
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2008-01-01 01:24:13 PST
Now that we are throwing a custom JS object for the core exceptions, and the base work is done, we should be throwing the different objects for the different types of exceptions.
Comment 1 Sam Weinig 2008-01-01 15:59:48 PST
Created attachment 18229 [details]

This patch makes JS objects for all the Exception types, and uses a shared base class for the implementation.  I have tests for the EventException, RangeException, and XPathExceptions, and am still working on making SVG and XHR tests, but I thought I would put this up for review while I figured out how to do that, in order to make sure that I was on the right track with it.
Comment 2 Eric Seidel (no email) 2008-01-01 16:41:24 PST
Comment on attachment 18229 [details]

The approach looks sane.  My impression was you were going to add more tests before we did a real review.  You also just noted over IRC that the XHR exceptions were different from expected.
Comment 3 Darin Adler 2008-01-01 19:40:55 PST
Comment on attachment 18229 [details]

I'm really worried that the named constants that are members of the classes are not the same values as the same-named constants in the JavaScript language binding.

Otherwise, I love this.

Comment 4 Sam Weinig 2008-01-01 21:47:11 PST
Landed in r29073.