Closed Bug 1504492 Opened 1 year ago Closed 1 year ago

Ensure arguments to readableStreamWriteIntoReadRequestCallback are same-compartment

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Oops:

    auto cb = cx->runtime()->readableStreamWriteIntoReadRequestCallback;
    ...
    // TODO: make this compartment-safe.
    cb(cx, stream, underlyingSource, stream->embeddingFlags(), buffer,
       queueTotalSize, &bytesWritten);

https://searchfox.org/mozilla-central/rev/50ba1dd30cf013bddce1ae756f1b3c95b26f0628/js/src/builtin/Stream.cpp#3715-3717

There's another apparently identical copy of this code, including the comment, here:

https://searchfox.org/mozilla-central/rev/50ba1dd30cf013bddce1ae756f1b3c95b26f0628/js/src/builtin/Stream.cpp#4580-4582

So we might as well common those up while we're here.
Blocks: streams-ship
No longer blocks: streams-enable
Attachment #9023480 - Attachment is obsolete: true
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/52e0d4aa9686
Ensure arguments to readableStreamWriteIntoReadRequestCallback are same-compartment. r=tcampbell,baku
https://hg.mozilla.org/mozilla-central/rev/52e0d4aa9686
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Assignee: nobody → jorendorff
You need to log in before you can comment on or make changes to this bug.