Bug 150167 - Binding generator should allow generating private JS functions
Summary: Binding generator should allow generating private JS functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-15 06:35 PDT by youenn fablet
Modified: 2015-10-19 03:37 PDT (History)
5 users (show)

See Also:


Attachments
Patch (17.95 KB, patch)
2015-10-15 06:44 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (17.97 KB, patch)
2015-10-19 02:57 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 2015-10-15 06:35:58 PDT
JS builtins functions may need getting access to private JS functions implemented through DOM classes.
It may be convenient for the binding generator to support this.
Comment 1 youenn fablet 2015-10-15 06:44:25 PDT
Created attachment 263152 [details]
Patch
Comment 2 WebKit Commit Bot 2015-10-15 06:45:49 PDT
Attachment 263152 [details] did not pass style-queue:


ERROR: Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp:30:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 1 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 youenn fablet 2015-10-15 06:47:20 PDT
I used MediaDevices.getUserMedia as an example as it could be readily used for webkitGetUserMedia JS builtin implementation.
See bug 149499.
Comment 4 youenn fablet 2015-10-15 06:51:59 PDT
See bug 150166 for another related usecase.
Comment 5 Adam Bergkvist 2015-10-15 06:56:15 PDT
+1 for this feature
Comment 6 Darin Adler 2015-10-18 16:27:21 PDT
Comment on attachment 263152 [details]
Patch

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

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:372
> +    return 1 if ($function->signature->type eq "Promise");

No need for the parentheses.

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:374
> +    return 1 if ($function->signature->type eq "Date");

Ditto.

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:376
> +    return 1 if ($function->signature->extendedAttributes->{"JSBuiltin"});

Ditto.

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:378
> +    return 1 if ($function->signature->extendedAttributes->{"Private"});

Ditto.

> Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm:550
> +    return 1 if ($function->signature->extendedAttributes->{"Private"});

No need for the parentheses.
Comment 7 youenn fablet 2015-10-19 02:57:20 PDT
Created attachment 263463 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2015-10-19 03:37:22 PDT
Comment on attachment 263463 [details]
Patch for landing

Clearing flags on attachment: 263463

Committed r191287: <http://trac.webkit.org/changeset/191287>
Comment 9 WebKit Commit Bot 2015-10-19 03:37:27 PDT
All reviewed patches have been landed.  Closing bug.