Summary: | document.importNode(null) crashes | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Maciej Stachowiak <mjs> | ||||
Component: | DOM | Assignee: | Geoffrey Garen <ggaren> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cdumez | ||||
Priority: | P1 | Keywords: | EasyFix | ||||
Version: | 420+ | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.4 | ||||||
URL: | javascript:document.importNode(null) | ||||||
Attachments: |
|
Description
Maciej Stachowiak
2006-04-21 00:04:50 PDT
I'm on it. Created attachment 7878 [details]
Fix
Comment on attachment 7878 [details]
Fix
Looks good.
Comment on attachment 7878 [details]
Fix
Geoff, there's a reason I used this style:
case DOCUMENT_TYPE_NODE:
case DOCUMENT_FRAGMENT_NODE:
case NOTATION_NODE:
- break;
+ default:
+ ec = NOT_SUPPORTED_ERR;
+ return 0;
}
-
- ec = NOT_SUPPORTED_ERR;
- return 0;
}
If you don't have a "default" in your switch statement, gcc will give you a warning if you leave any enum values out. So I often write switch statements in a slightly awkward way, just to avoid putting a default in. Here your patch is undoing that.
Reverted code Darin mentioned, then landed. Mass moving XML DOM bugs to the "DOM" Component. |