Closed
Bug 1446051
Opened 7 years ago
Closed 7 years ago
Use CallICU for str_normalize
Categories
(Core :: JavaScript: Standard Library, enhancement, P3)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla61
| Tracking | Status | |
|---|---|---|
| firefox61 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(1 file, 1 obsolete file)
|
6.44 KB,
patch
|
anba
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Updated•7 years ago
|
Priority: -- → P3
| Assignee | ||
Comment 1•7 years ago
|
||
Use |intl::CallICU| for str_normalize, so we don't need to handle |U_BUFFER_OVERFLOW_ERROR| manually in str_normalize. I've moved |remainingStart| and |remainingLength| into the lambda, because otherwise the capture list gets too large and can no longer be properly formatted.
Attachment #8959223 -
Flags: review?(jwalden+bmo)
Comment 2•7 years ago
|
||
...we have proper formatting for lambdas, particularly those with lengthy capture lists?
Comment 3•7 years ago
|
||
Comment on attachment 8959223 [details] [diff] [review]
bug1446051.patch
Review of attachment 8959223 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/builtin/String.cpp
@@ +1644,5 @@
> + intl::CallICU(cx, [normalizer, &srcChars, spanLength](UChar* chars, uint32_t size,
> + UErrorCode* status)
> + {
> + mozilla::RangedPtr<const char16_t> remainingStart = srcChars.begin() + spanLength;
> + size_t remainingLength = srcChars.length() - size_t(spanLength);
All these size_t(spanLength) in this function overall are a bit silly. We probably should get a size_t local going after we've passed the unorm2_spanQuickCheckYes status-check. Maybe in a followup patch, rs=me on that if you want.
Attachment #8959223 -
Flags: review?(jwalden+bmo) → review+
| Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Jeff Walden [:Waldo] from comment #3)
> All these size_t(spanLength) in this function overall are a bit silly. We
> probably should get a size_t local going after we've passed the
> unorm2_spanQuickCheckYes status-check. Maybe in a followup patch, rs=me on
> that if you want.
I'll need to update intl::CallICU() for this patch, because I forgot that intl::CallICU() asserts that the input chars-vector is empty. And as part of that update, I'll also add a local variable for size_t(spanLength).
| Assignee | ||
Comment 5•7 years ago
|
||
Updated patch to change |intl::CallICU()| assertions to allow non-empty chars-vector. Tentatively carrying r+.
Attachment #8959223 -
Attachment is obsolete: true
Attachment #8960193 -
Flags: review+
| Assignee | ||
Comment 6•7 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=fda78b7e464578358e20764819cee47cb68ccdd7
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2356a4fada56
Use CallICU helper for str_normalize. r=Waldo
Keywords: checkin-needed
Comment 8•7 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•