Add equivalent of CommonUtils.{read,write}JSON to IOUtils
Categories
(Toolkit Graveyard :: OS.File, task)
Tracking
(firefox86 fixed)
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: barret, Assigned: barret)
References
Details
Attachments
(4 files)
Some usages of CommonUtils are just importing it to use read/writeJSON, e.g.https://searchfox.org/mozilla-central/rev/5a1a34953a26117f3be1a00db20c8bbdc03273d6/toolkit/modules/ProfileAge.jsm#153
This is more instances of "import a module just to do IO", which we are trying to avoid.
Assignee | ||
Comment 1•3 years ago
|
||
RunOnBackgroundThread has been renamed to RunOnBackgroundThreadAndResolve. The
body dealing with calling InvokeAsync for calling a function on the background
event target and returning a MozPromise has been refactored into a new
function, RunOnBackgroundThread.
This allows us to have more complicated IOUtils methods that do not simply
resolve their promises to whatever is returned by the background methods.
Depends on D99001
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Depends on D99002
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D99154
Assignee | ||
Comment 4•3 years ago
|
||
This patch is a minor cleanup based on prior feedback to make all of IOUtils
consistent.
Depends on D99155
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3595d192a9e0 Refactor RunOnBackgroundThread r=nika https://hg.mozilla.org/integration/autoland/rev/3cc0c110b0ec Add IOUtils::ReadJSON r=nika,tcampbell https://hg.mozilla.org/integration/autoland/rev/ac0d932fe580 Add IOUtils::WriteJSON r=nika,tcampbell https://hg.mozilla.org/integration/autoland/rev/cbd8324d869d Replace remaining usage of NS_ENSURE_TRUE in IOUtils r=nika
Comment 6•3 years ago
|
||
Backed out for failures on test_ioutils_read_write_json.html
backout: https://hg.mozilla.org/integration/autoland/rev/0a254d8f2ed1dd4201a3c59009a60868cc116f3b
- failed on tier 1 on a subsequent push https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=fbce1827bb9e2fa1afd5216b35e5cce781463646&searchStr=mochitest%2Cproc&selectedTaskRun=NpLejwzCTyew_FktA0epFg.0
failure log: https://treeherder.mozilla.org/logviewer?job_id=326859535&repo=autoland&lineNumber=119689
[task 2021-01-15T21:15:45.306Z] 21:15:45 INFO - TEST-PASS | dom/system/tests/ioutils/test_ioutils_read_write_json.html | C:\Users\task_1610743855\AppData\Local\Temp\test_ioutils_read_json_not_exists.tmp should not exist
[task 2021-01-15T21:15:45.306Z] 21:15:45 INFO - Buffered messages finished
[task 2021-01-15T21:15:45.307Z] 21:15:45 INFO - TEST-UNEXPECTED-FAIL | dom/system/tests/ioutils/test_ioutils_read_write_json.html | TypeError: promise.then is not a function - Should not throw any errors
[task 2021-01-15T21:15:45.307Z] 21:15:45 INFO - proto.rejects/<@resource://testing-common/Assert.jsm:501:8
[task 2021-01-15T21:15:45.307Z] 21:15:45 INFO - Promise@resource://gre/modules/Promise-backend.js:419:14
[task 2021-01-15T21:15:45.307Z] 21:15:45 INFO - proto.rejects@resource://testing-common/Assert.jsm:499:10
[task 2021-01-15T21:15:45.307Z] 21:15:45 INFO - read_json@chrome://mochitests/content/chrome/dom/system/tests/ioutils/test_ioutils_read_write_json.html:77:20
[task 2021-01-15T21:15:45.307Z] 21:15:45 INFO - GECKO(10248) | MEMORY STAT | vsize 2104261MB | vsizeMaxContiguous 65036462MB | residentFast 309MB | heapAllocated 116MB
[task 2021-01-15T21:15:45.307Z] 21:15:45 INFO - TEST-OK | dom/system/tests/ioutils/test_ioutils_read_write_json.html | took 193ms
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b037f116b5e9 Refactor RunOnBackgroundThread r=nika https://hg.mozilla.org/integration/autoland/rev/a2db746501c5 Add IOUtils::ReadJSON r=nika,tcampbell https://hg.mozilla.org/integration/autoland/rev/1e4fe7771587 Add IOUtils::WriteJSON r=nika,tcampbell https://hg.mozilla.org/integration/autoland/rev/1c0fd915e7e3 Replace remaining usage of NS_ENSURE_TRUE in IOUtils r=nika
Assignee | ||
Updated•3 years ago
|
Comment 8•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b037f116b5e9
https://hg.mozilla.org/mozilla-central/rev/a2db746501c5
https://hg.mozilla.org/mozilla-central/rev/1e4fe7771587
https://hg.mozilla.org/mozilla-central/rev/1c0fd915e7e3
Updated•11 months ago
|
Description
•