Add surrogate pair handling API to nsTextFragment
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
Details
Attachments
(1 file)
We check surrogate pair at specific index in nsTextFragement
in a lot of places. That requires range check of the index so that it can be security issue and crash reason with simple mistake, and also it steals your time to understand the code especially when it's a part of if
condition.
We should add new API to nsTextFragment
and makes the all ones which handle surrogate pairs in nsTextFragment
use them.
I think that TSubstring
should have same API for surrogate pairs, though.
Assignee | ||
Comment 1•5 years ago
|
||
We check surrogate pair at specific index in nsTextFragement
in a lot of
places. This requires boundary check of the index so that it can cause
security issue and crash reason with simple mistake, and also it steals
your time to understand the code what it does especially when it's a
part of an if
condition.
Therefore, this patch adds new API to nsTextFragment
and makes the all
surrogate pair handlers of nsTextFragument
use new API.
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/636e6732c822 Add surrogate pair handling API to `nsTextFragment` r=hsivonen
Comment 3•5 years ago
|
||
bugherder |
Description
•