| Summary: | DOM exception creator functions should return Ref. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||
| Component: | DOM | Assignee: | Andreas Kling <kling> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | kling | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Andreas Kling
2014-12-25 16:32:04 PST
Created attachment 243750 [details]
Patch
Comment on attachment 243750 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=243750&action=review r=me with one suggestion. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1174 > + push(@headerContent, "inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, $implType& impl) { return toJS(exec, globalObject, &impl); }\n"); Would be nice to do the opposite (have the one taking a pointer calling the one taking a ref, after doing the null-check). This way, we'll do less null checks thanks to Ref<>. (In reply to comment #2) > Comment on attachment 243750 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=243750&action=review > > r=me with one suggestion. > > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1174 > > + push(@headerContent, "inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, $implType& impl) { return toJS(exec, globalObject, &impl); }\n"); > > Would be nice to do the opposite (have the one taking a pointer calling the > one taking a ref, after doing the null-check). This way, we'll do less null > checks thanks to Ref<>. Good idea! I'll do that separately. Comment on attachment 243750 [details] Patch Clearing flags on attachment: 243750 Committed r177744: <http://trac.webkit.org/changeset/177744> All reviewed patches have been landed. Closing bug. |