Closed Bug 1653003 Opened 4 years ago Closed 4 years ago

Port OS.File remove to C++

Categories

(Toolkit Graveyard :: OS.File, task)

Tracking

(firefox80 fixed)

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: mail, Assigned: mail)

References

Details

Attachments

(1 file)

Part of larger work to port OS.File to C++, we need a static method in the IOUtils interface which can remove files and directories.

Assignee: nobody → krourke

This patch introduces a remove method to the IOUtils interface, which allows
for removing files and directories on disk. It is a simple wrapper around
the nsIFile::Remove method.

Depends on D82982

Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8dee8cb525a2 Implement IOUtils::remove method r=barret,Gijs

Backed out changeset 8dee8cb525a2 (bug 1653003) for test_ioutils.html failures

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&searchStr=windows%2C10%2Cx64%2Cdebug%2Cmochitests%2Cwithout%2Ce10s%2Ctest-windows10-64%2Fdebug-mochitest-chrome-1proc%2Cc1&fromchange=cc31df5b2aca191cd19dd991e49d4e33a81f1fb1&tochange=162a3ca59e61c6e1638a67f7454fd5d1099560a7&selectedTaskRun=GOE4kEEnTrWk7w6NOeAQBQ.0

Backout link: https://hg.mozilla.org/integration/autoland/rev/98ed93a8c36a3c541286862ff84d07037b57a713

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=309903907&repo=autoland&lineNumber=107014

...
[task 2020-07-15T21:26:00.272Z] 21:26:00     INFO - add_task | Entering test test_remove_recursive
[task 2020-07-15T21:26:00.272Z] 21:26:00     INFO - TEST-PASS | dom/system/tests/test_ioutils.html | Created temporary file at: C:\Users\task_1594847325\AppData\Local\Temp\test_ioutils_remove.tmp.d\top.tmp 
[task 2020-07-15T21:26:00.273Z] 21:26:00     INFO - TEST-PASS | dom/system/tests/test_ioutils.html | Created temporary file at: C:\Users\task_1594847325\AppData\Local\Temp\test_ioutils_remove.tmp.d\child.tmp.d\nested.tmp 
[task 2020-07-15T21:26:00.273Z] 21:26:00     INFO - TEST-PASS | dom/system/tests/test_ioutils.html | Expected file to exist 
[task 2020-07-15T21:26:00.273Z] 21:26:00     INFO - TEST-PASS | dom/system/tests/test_ioutils.html | Expected file to exist 
[task 2020-07-15T21:26:00.273Z] 21:26:00     INFO - Buffered messages finished
[task 2020-07-15T21:26:00.273Z] 21:26:00     INFO - TEST-UNEXPECTED-FAIL | dom/system/tests/test_ioutils.html | UnknownError: Unexpected error removing file: NS_ERROR_FAILURE - Should not throw any errors
[task 2020-07-15T21:26:00.273Z] 21:26:00     INFO - nextTick/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:2205:26
[task 2020-07-15T21:26:00.273Z] 21:26:00     INFO - GECKO(9204) | MEMORY STAT | vsize 2104268MB | vsizeMaxContiguous 65703636MB | residentFast 321MB | heapAllocated 129MB
[task 2020-07-15T21:26:00.273Z] 21:26:00     INFO - TEST-OK | dom/system/tests/test_ioutils.html | took 292ms
Flags: needinfo?(krourke)

I'm investigating this failure — hope to have a fix soon so we can try to re-land this patch.

Flags: needinfo?(krourke)
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cb12688fbb61 Implement IOUtils::remove method r=barret,Gijs
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: