[Webkit-unassigned] [Bug 102726] New: Make ExceptionCode be an enum that does not encode the "code" prooperty
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 19 15:41:19 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=102726
Summary: Make ExceptionCode be an enum that does not encode the
"code" prooperty
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: arv at chromium.org
CC: mkwst at chromium.org, jsbell at chromium.org,
alecflett at chromium.org
Due to historical reason the ExceptionCode enum value also matches the DOM level 1/2/3 code number.
enum {
INDEX_SIZE_ERR = 1,
HIERARCHY_REQUEST_ERR = 3,
WRONG_DOCUMENT_ERR = 4,
...
}
New specs always say, throw "IndexSizeError" etc and new exceptions do not have a code (the code is returned as 0).
I think it would be cleaner to have the enum match the names used in the spec and then have a separate table that maps the enum to the code as needed.
enum {
IndexSizeError = 1, // start at 1 so 0 can still be used for no error
HierarchyRequestError,
WrongDocumentError,
...
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list