Bug 16691

Summary: Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)
Product: WebKit Reporter: Sam Weinig <sam>
Component: WebCore JavaScriptAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
patch darin: review+

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]
patch

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]
patch

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]
patch

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.

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