Closed Bug 1083476 Opened 10 years ago Closed 7 years ago

Add console warnings for JS1.7 legacy generators

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: cpeterson, Assigned: emk)

References

Details

Attachments

(1 file)

Blocks: 867615
Blocks: 968038
Blocks: 1083485
Blocks: 867612
Blocks: 1104014
No longer blocks: 1083485
Blocks: 1083482
No longer blocks: 968038
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.
(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 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 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)
Attachment #8894217 - Flags: feedback+
(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 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: nobody → VYV03354
Status: NEW → ASSIGNED
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.
Pushed by VYV03354@nifty.ne.jp: https://hg.mozilla.org/integration/autoland/rev/3f4d9d490af2 Add console warnings for JS1.7 legacy generators. r=arai
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: