Bug 142788 - Built-in functions should know that they use strict mode
Summary: Built-in functions should know that they use strict mode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-17 13:14 PDT by Geoffrey Garen
Modified: 2015-03-17 14:15 PDT (History)
3 users (show)

See Also:


Attachments
Patch (27.87 KB, patch)
2015-03-17 13:22 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (28.97 KB, patch)
2015-03-17 13:38 PDT, Geoffrey Garen
mark.lam: review+
Details | Formatted Diff | Diff
Patch (29.55 KB, patch)
2015-03-17 14:02 PDT, Geoffrey Garen
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2015-03-17 13:14:53 PDT
Built-in functions should know that they use strict mode
Comment 1 Geoffrey Garen 2015-03-17 13:22:32 PDT
Created attachment 248863 [details]
Patch
Comment 2 Geoffrey Garen 2015-03-17 13:38:45 PDT
Created attachment 248866 [details]
Patch
Comment 3 WebKit Commit Bot 2015-03-17 13:41:45 PDT
Attachment 248866 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/parser/Parser.cpp:210:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 1 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Ryosuke Niwa 2015-03-17 13:43:47 PDT
Comment on attachment 248866 [details]
Patch

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

> Source/JavaScriptCore/parser/ParserModes.h:34
> +enum JSParserStrictMode { JSParseNotStrictMode, JSParseStrictMode };

Can we use enum class instead?  It makes future find/replace much easier and prevents accidental casts to integral types.
Comment 5 Geoffrey Garen 2015-03-17 13:45:33 PDT
> Can we use enum class instead?

OK.
Comment 6 Geoffrey Garen 2015-03-17 14:02:22 PDT
Created attachment 248869 [details]
Patch
Comment 7 WebKit Commit Bot 2015-03-17 14:04:10 PDT
Attachment 248869 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/parser/Parser.cpp:210:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 1 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Mark Lam 2015-03-17 14:06:12 PDT
Comment on attachment 248866 [details]
Patch

r=me with Ryosuke's suggested fixes (and style issue resolved if valid, though it doesn't look like a valid complaint to me from the diff).
Comment 9 Mark Lam 2015-03-17 14:07:27 PDT
Comment on attachment 248869 [details]
Patch

r=me
Comment 10 Geoffrey Garen 2015-03-17 14:15:35 PDT
Committed r181664: <http://trac.webkit.org/changeset/181664>