Bug 139947 - DOM exception creator functions should return Ref.
Summary: DOM exception creator functions should return Ref.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-25 16:32 PST by Andreas Kling
Modified: 2014-12-25 20:23 PST (History)
1 user (show)

See Also:


Attachments
Patch (19.09 KB, patch)
2014-12-25 16:52 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.