Closed
Bug 1321218
Opened 7 years ago
Closed 7 years ago
Remove legacy generator from dom/.
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
265.25 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
If the code fits into async function and also it's test code, replaced legacy generator with async function. for other cases, just replaced legacy generator with ES6 generator. some notes: * dom/archivereader/test/helpers.js all testSteps can be normal function, not generator so just removed |testGenerator| * dom/archivereader/test/test_basic.html * dom/archivereader/test/test_nonUnicode.html * dom/archivereader/test/test_zip_in_zip.html removed unnecessary |yield| to make it normal function * dom/base/test/browser_use_counters.js Task.async can be rewritten with async simply, by replacing yield to await * dom/base/test/referrer_helper.js ES6 generator doesn't throw StopIteration, so we can just remove final yield * dom/base/test/test_bug544642.html ES6 generator doesn't have |send|, but |next| receives a value * dom/base/test/test_bug682592.html ES6 generator returns object with done property is true when it returns so changed try-catch check to done property check * dom/browser-element/mochitest/browserElement_ActiveStateChange.js this case |runTests| fits into async, since setCommand can return promise that is resolved when it's done not related to this bug tho, just changed removeEventListener to {once: true} parameter of addEventListener * dom/html/test/test_anchor_ping.html all tests are generator, so we can just do |yield*| * dom/tests/mochitest/general/test_domWindowUtils.html waiting for single shot eventlistener can be done by a Promise that resolves when the event is fired. so removed |next| function and just await for the promise. SimpleTest.executeSoon done at the 1st test looks like intended to wait between 2 tests, so moved it to runner.
Attachment #8815633 -
Flags: review?(bugs)
Comment 1•7 years ago
|
||
Comment on attachment 8815633 [details] [diff] [review] Remove legacy generator from dom/. rs+ Make sure we run as many test assertions with and without this patch.
Attachment #8815633 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 2•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a8703321e8a8bf3c8769dec1007e72dad3b01dd Bug 1321218 - Remove legacy generator from dom/. r=smaug
Comment 3•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4a8703321e8a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•