Bug 155854 - ES6: Implement IsRegExp function and use where needed in String.prototype.* methods
Summary: ES6: Implement IsRegExp function and use where needed in String.prototype.* m...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-24 14:45 PDT by Saam Barati
Modified: 2016-03-25 11:35 PDT (History)
4 users (show)

See Also:


Attachments
patch (12.07 KB, patch)
2016-03-24 15:19 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (12.07 KB, patch)
2016-03-24 15:20 PDT, Saam Barati
mark.lam: review+
Details | Formatted Diff | Diff
patch (13.48 KB, patch)
2016-03-24 15:24 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch for landing (13.48 KB, patch)
2016-03-24 15:29 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2016-03-24 14:45:31 PDT
https://tc39.github.io/ecma262/#sec-isregexp
Comment 1 Saam Barati 2016-03-24 15:19:02 PDT
Created attachment 274858 [details]
patch
Comment 2 Saam Barati 2016-03-24 15:20:39 PDT
Created attachment 274859 [details]
patch
Comment 3 Mark Lam 2016-03-24 15:23:23 PDT
Comment on attachment 274859 [details]
patch

r=me
Comment 4 Saam Barati 2016-03-24 15:24:04 PDT
Created attachment 274860 [details]
patch
Comment 5 Saam Barati 2016-03-24 15:29:25 PDT
Created attachment 274861 [details]
patch for landing
Comment 6 Saam Barati 2016-03-24 16:19:07 PDT
landed in:
http://trac.webkit.org/changeset/198652
Comment 7 Darin Adler 2016-03-25 10:22:41 PDT
Comment on attachment 274861 [details]
patch for landing

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

> Source/JavaScriptCore/runtime/StringPrototype.cpp:1848


1) "cannot" is a single word, "can not" is incorrect. English is stranger than C++™.
2) We should figure out a consistent style for these error strings. A cleanup for the future.
3) Should this have a period or not?

> Source/JavaScriptCore/runtime/StringPrototype.cpp:1884
> +        return throwVMTypeError(exec, "Argument to String.prototype.endsWith can not be a RegExp.");

Ditto.
Comment 8 Saam Barati 2016-03-25 11:01:53 PDT
(In reply to comment #7)
> Comment on attachment 274861 [details]
> patch for landing
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=274861&action=review
> 
> > Source/JavaScriptCore/runtime/StringPrototype.cpp:1848
> 
> 
> 1) "cannot" is a single word, "can not" is incorrect. English is stranger
> than C++™.
> 2) We should figure out a consistent style for these error strings. A
> cleanup for the future.
> 3) Should this have a period or not?
> 
> > Source/JavaScriptCore/runtime/StringPrototype.cpp:1884
> > +        return throwVMTypeError(exec, "Argument to String.prototype.endsWith can not be a RegExp.");
> 
> Ditto.

Thanks. I will update these.
Comment 9 Saam Barati 2016-03-25 11:35:53 PDT
Big to fix grammar

https://bugs.webkit.org/show_bug.cgi?id=155895