Bug 151104 - [Streams API] Remove bind usage
Summary: [Streams API] Remove bind usage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Xabier Rodríguez Calvar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-10 09:39 PST by Xabier Rodríguez Calvar
Modified: 2015-11-11 05:25 PST (History)
5 users (show)

See Also:


Attachments
Patch (15.80 KB, patch)
2015-11-10 10:00 PST, Xabier Rodríguez Calvar
no flags Details | Formatted Diff | Diff
Patch (1.48 KB, patch)
2015-11-11 01:11 PST, Xabier Rodríguez Calvar
no flags Details | Formatted Diff | Diff
Patch (10.84 KB, patch)
2015-11-11 01:46 PST, Xabier Rodríguez Calvar
no flags Details | Formatted Diff | Diff
Patch (12.38 KB, patch)
2015-11-11 02:29 PST, Xabier Rodríguez Calvar
no flags Details | Formatted Diff | Diff
Patch for landing (1.69 KB, patch)
2015-11-11 04:30 PST, Xabier Rodríguez Calvar
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xabier Rodríguez Calvar 2015-11-10 09:39:00 PST
[Streams API] Shield bind call
Comment 1 Xabier Rodríguez Calvar 2015-11-10 10:00:52 PST
Created attachment 265193 [details]
Patch
Comment 2 youenn fablet 2015-11-10 11:28:03 PST
As I said in bug 151089, I am unsure whether we should support @bind or just an inlined polyfill of it. Also @apply and @call are special cased. Should @bind follow the same path?
Comment 3 Xabier Rodríguez Calvar 2015-11-11 01:11:57 PST
Created attachment 265275 [details]
Patch

(In reply to comment #2)
> As I said in bug 151089, I am unsure whether we should support @bind or just
> an inlined polyfill of it. Also @apply and @call are special cased. Should
> @bind follow the same path?

I might have taken your comment at bug 151089 too literally.

I created an inline function to remove the use of bind.

About making it a special case as @apply and @call I am not sure if it makes sense now. If we do this, I think we could do a longer review of all things done at the builtins because there are probably similar things.
Comment 4 Xabier Rodríguez Calvar 2015-11-11 01:46:54 PST
Created attachment 265277 [details]
Patch

Reuploaded the right patch.
Comment 5 Xabier Rodríguez Calvar 2015-11-11 02:29:50 PST
Created attachment 265279 [details]
Patch
Comment 6 youenn fablet 2015-11-11 04:00:44 PST
Comment on attachment 265277 [details]
Patch

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

> LayoutTests/ChangeLog:3
> +        [Streams API] Shield bind call

Let's rename the bug to something like "Remove bind usage from streams API".

Since bind/@bind makes stream code more readable, we may want to create a new bug entry to continue discussing whether we should go with a secure @bind, especially if other built-ins plan to use it.

> LayoutTests/streams/streams-security-expected.txt:9
> +PASS Streams and Function: replace bind method in Function prototype 

We may want to remove that test since bind is not used anymore
Comment 7 Xabier Rodríguez Calvar 2015-11-11 04:30:25 PST
Created attachment 265281 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2015-11-11 05:25:30 PST
Comment on attachment 265281 [details]
Patch for landing

Clearing flags on attachment: 265281

Committed r192309: <http://trac.webkit.org/changeset/192309>
Comment 9 WebKit Commit Bot 2015-11-11 05:25:34 PST
All reviewed patches have been landed.  Closing bug.