Closed Bug 1642454 Opened 5 years ago Closed 5 years ago

Port OS.File read/writeAtomic 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

(4 files)

Part of larger work to port OS.File to C++, we'd like to define a small Web IDL interface to implement static read/writeAtomic methods (which are the most used methods of the OS.File API) in C++.

Attachment #9153948 - Attachment description: Bug 1642454: WIP IOUtils::Read WriteAtomic → Bug 1642454: WIP Implement IOUtils::Read and WriteAtomic
Assignee: nobody → krourke
Attachment #9153948 - Attachment description: Bug 1642454: WIP Implement IOUtils::Read and WriteAtomic → Bug 1642454: Implement IOUtils read and writeAtomic methods r=barret,smaug,Gijs
Status: NEW → ASSIGNED

The class PR_CloseDelete is a useful deletor for automatically closing NSPR File
Descriptors when used with UniquePtr. This patch extracts this class from
nsTerminator.cpp to a new module at toolkit/library/nsprutil so it may be used
by new code.

This patch extracts some functions from OS.File tests to
mochitest/tests/SimpleTest to be more readily used by new code which needs to
run tests in ChromeWorkers.

Depends on D80896

Attachment #9158936 - Attachment description: Bug 1642454: Extract PR_CloseDelete to new toolkit/library/nsprutil module r=barret,smaug → Bug 1642454: Move PR_CloseDelete to dom/system r=barret,smaug
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dfb201663480 Move PR_CloseDelete to dom/system r=barret,smaug https://hg.mozilla.org/integration/autoland/rev/1e68090eed0b Explicitly list copy and move assignment and ctor in PR_CloseDelete r=barret,smaug https://hg.mozilla.org/integration/autoland/rev/7896b4315920 Promote worker testing functions to mochitest/tests/SimpleTest r=gbrown https://hg.mozilla.org/integration/autoland/rev/13553531fc62 Implement IOUtils read and writeAtomic methods r=barret,smaug,Gijs
Backout by nbeleuzu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dd44f8b0b7dc Backed out 4 changesets for failures on dom/system/tests/test_ioutils_worker.xhtml . CLOSED TREE
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7deedab9e8d3 Move PR_CloseDelete to dom/system r=barret,smaug https://hg.mozilla.org/integration/autoland/rev/05642361f23b Explicitly list copy and move assignment and ctor in PR_CloseDelete r=barret,smaug https://hg.mozilla.org/integration/autoland/rev/5b0c6f346230 Promote worker testing functions to mochitest/tests/SimpleTest r=gbrown https://hg.mozilla.org/integration/autoland/rev/14af8a35e823 Implement IOUtils read and writeAtomic methods r=barret,smaug,Gijs
Blocks: 1650898
Blocks: 1651742
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: