Closed
Bug 1083476
Opened 10 years ago
Closed 7 years ago
Add console warnings for JS1.7 legacy generators
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: cpeterson, Assigned: emk)
References
Details
Attachments
(1 file)
The console warnings should point readers to MDN:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*
Updated•8 years ago
|
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
Oh this sounds nice! Does this warning trigger at all? I seem to remember that we still had a lot of legacy generator functions in chrome code, so just enabling this would overwhelm everything.
Comment 3•7 years ago
|
||
(In reply to Limited Availabilty till Oct | Tom Schuster [:evilpie] from comment #2)
> I seem to remember
> that we still had a lot of legacy generator functions in chrome code, so
> just enabling this would overwhelm everything.
for mozilla-central, most of them should be removed in bug 968038 and depending bugs.
there may be some remainder tho.
for comm-central, there's 2 bugs under bug 1123122, but can be fixed within 2 weeks I hope.
Comment 4•7 years ago
|
||
Comment on attachment 8894217 [details]
Bug 1083476 - Add console warnings for JS1.7 legacy generators.
Oh wow you fixed a ton of stuff, I had no idea. You get the honor of review it :)
Attachment #8894217 -
Flags: review?(evilpies) → review?(arai.unmht)
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8894217 [details]
Bug 1083476 - Add console warnings for JS1.7 legacy generators.
https://reviewboard.mozilla.org/r/165296/#review170876
Thank you for taking this :D
It looks almost perfect, except one cosmetic fix below.
(iiuc, we cannot use "r+ with fix" in MozReview)
::: js/src/frontend/Parser.cpp:6805
(Diff revision 1)
>
> pc->functionBox()->setGeneratorKind(LegacyGenerator);
> addTelemetry(DeprecatedLanguageExtension::LegacyGenerator);
> + if (!warnOnceAboutLegacyGenerator()) {
> + return null();
> + }
Please remove braces around one-liner if
::: js/src/jit-test/tests/parser/yield-without-operand.js:8
(Diff revision 1)
> load(libdir + "asserts.js");
>
> -assertNoWarning(() => Function("yield"), SyntaxError,
> +let GeneratorFunction = Object.getPrototypeOf(function*(){}).constructor;
> +
> +assertNoWarning(() => GeneratorFunction("yield"),
> "yield followed by EOF is fine");
we can just remove this file.
it's no more testing what the testcase is initially for, after several changes.
::: js/src/jscompartment.h:627
(Diff revision 1)
> bool isSelfHosting;
> bool marked;
> - bool warnedAboutDateToLocaleFormat;
> - bool warnedAboutExprClosure;
> - bool warnedAboutForEach;
> + bool warnedAboutDateToLocaleFormat : 1;
> + bool warnedAboutExprClosure : 1;
> + bool warnedAboutForEach : 1;
> + bool warnedAboutLegacyGenerator : 1;
Nice change :)
Attachment #8894217 -
Flags: review?(arai.unmht)
Updated•7 years ago
|
Attachment #8894217 -
Flags: feedback+
Comment 6•7 years ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #5)
> Thank you for taking this :D
> It looks almost perfect, except one cosmetic fix below.
> (iiuc, we cannot use "r+ with fix" in MozReview)
We can. :) Mozreview prevents landing until all issues are marked resolved. The r+ carries forward to the next push, and the issues need to be marked resolved before landing.
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8894217 [details]
Bug 1083476 - Add console warnings for JS1.7 legacy generators.
https://reviewboard.mozilla.org/r/165296/#review170902
(In reply to Kris Maglione [:kmag] from comment #6)
> (In reply to Tooru Fujisawa [:arai] from comment #5)
> > Thank you for taking this :D
> > It looks almost perfect, except one cosmetic fix below.
> > (iiuc, we cannot use "r+ with fix" in MozReview)
>
> We can. :) Mozreview prevents landing until all issues are marked resolved.
> The r+ carries forward to the next push, and the issues need to be marked
> resolved before landing.
Thank you for letting me know that :D
okay, then r+ with the braces removed.
whether removing yield-without-operand.js or not is up to you.
Attachment #8894217 -
Flags: review+
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Assignee | ||
Comment 9•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8894217 [details]
Bug 1083476 - Add console warnings for JS1.7 legacy generators.
https://reviewboard.mozilla.org/r/165296/#review170876
> Please remove braces around one-liner if
Oh, I didn't realize SpiderMonkey did not change the coding rule even after gotofail. Removed the braces.
> we can just remove this file.
> it's no more testing what the testcase is initially for, after several changes.
Removed.
Comment 10•7 years ago
|
||
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/3f4d9d490af2
Add console warnings for JS1.7 legacy generators. r=arai
Comment 11•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Comment 12•7 years ago
|
||
https://hg.mozilla.org/projects/date/rev/3f4d9d490af28c3bf7e69b936ecf728f50fbeaca
Bug 1083476 - Add console warnings for JS1.7 legacy generators. r=arai
You need to log in
before you can comment on or make changes to this bug.
Description
•