Bug 157835 - Refactor toJS functions to use toJSNewlyCreated
Summary: Refactor toJS functions to use toJSNewlyCreated
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks: 157886
  Show dependency treegraph
 
Reported: 2016-05-18 06:21 PDT by youenn fablet
Modified: 2016-05-19 00:31 PDT (History)
1 user (show)

See Also:


Attachments
Patch (85.78 KB, patch)
2016-05-18 06:31 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (85.75 KB, patch)
2016-05-18 06:43 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (86.02 KB, patch)
2016-05-18 23:56 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2016-05-18 06:21:29 PDT
If toJS functions use toJSNewlyCreated, this will allow some code refactoring.
Comment 1 youenn fablet 2016-05-18 06:31:01 PDT
Created attachment 279240 [details]
Patch
Comment 2 youenn fablet 2016-05-18 06:43:43 PDT
Created attachment 279243 [details]
Patch
Comment 3 Chris Dumez 2016-05-18 16:51:51 PDT
Comment on attachment 279243 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=279243&action=review

r=me with a couple of comments.

> Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp:43
> +        return CREATE_DOM_WRAPPER(globalObject, AllVideoCapabilities, object);

bah, what about the WTFMove() ?

> Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp:44
> +    return CREATE_DOM_WRAPPER(globalObject, AllAudioCapabilities, object);

bah, what about the WTFMove() ?

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3449
> +            push(@implContent, "    return createNewWrapper<$className, $implType>(globalObject, WTFMove(impl));\n");

It does not hurt to call this one all the time. Let's just call this one all the time and get rid of the if ($svgPropertyType) check.
Comment 4 youenn fablet 2016-05-18 23:56:17 PDT
Created attachment 279364 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2016-05-19 00:31:49 PDT
Comment on attachment 279364 [details]
Patch for landing

Clearing flags on attachment: 279364

Committed r201129: <http://trac.webkit.org/changeset/201129>
Comment 6 WebKit Commit Bot 2016-05-19 00:31:53 PDT
All reviewed patches have been landed.  Closing bug.