Bug 139947

Summary: DOM exception creator functions should return Ref.
Product: WebKit Reporter: Andreas Kling <kling>
Component: DOMAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2014-12-25 16:32:04 PST
Yep.
Comment 1 Andreas Kling 2014-12-25 16:52:03 PST
Created attachment 243750 [details]
Patch
Comment 2 Chris Dumez 2014-12-25 19:33:28 PST
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<>.
Comment 3 Andreas Kling 2014-12-25 20:22:06 PST
(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 4 Andreas Kling 2014-12-25 20:23:33 PST
Comment on attachment 243750 [details]
Patch

Clearing flags on attachment: 243750

Committed r177744: <http://trac.webkit.org/changeset/177744>
Comment 5 Andreas Kling 2014-12-25 20:23:36 PST
All reviewed patches have been landed.  Closing bug.