Use latin-1 external string in XPCConvert with T_UTF8STRING is possible
Categories
(Core :: XPConnect, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox125 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(2 external files, 4 obsolete files)
similar to bug 1869687, but for UTF-8.
bug 1869726 will add xpc functions to convert UTF-8 string to external string if possible.
XPCConvert::NativeData2JS and XPCConvert::JSData2Native with nsXPTType::T_UTF8STRING can use them.
here's a result with prototype:
when starting up browser, there are:
- 932 calls to
NativeData2JSwithT_UTF8STRING- 258 of them are nsStringBuffer with ASCII, and can use latin-1 external string (doesn't fit inline string)
- total 28612 bytes of string data can be shared
- 24 of them are literal string with ASCII, and can use latin-1 external string (doesn't fit inline string)
- total 1837 bytes of string data can be shared
- 258 of them are nsStringBuffer with ASCII, and can use latin-1 external string (doesn't fit inline string)
- 2346 calls to
JSData2NativewithT_UTF8STRING- 38 of them are latin-1 external string created by the prototype
- total 2941 bytes of string data can be shared
- 38 of them are latin-1 external string created by the prototype
when opening YouTube top page after startup:
- 676 calls to
NativeData2JSwithT_UTF8STRING- 609 of them are nsStringBuffer with ASCII, and can use latin-1 external string (doesn't fit inline string)
- total 91696 bytes of string data can be shared
- 1 of them are literal string with ASCII, and can use latin-1 external string (doesn't fit inline string)
- total 145 bytes of string data can be shared
- 609 of them are nsStringBuffer with ASCII, and can use latin-1 external string (doesn't fit inline string)
- 1293 calls to
JSData2NativewithT_UTF8STRING- 7 of them are latin-1 external string created by the prototype
- total 168 bytes of string data can be shared
- 7 of them are latin-1 external string created by the prototype
| Assignee | ||
Comment 1•2 years ago
|
||
Depends on D198062
Comment 3•2 years ago
|
||
Backed out for causing build bustages at xpcpublic.h.
Backout link: https://hg.mozilla.org/integration/autoland/rev/53d4d65c33f1a556689dd9de738b173142e52749
Failure log: https://treeherder.mozilla.org/logviewer?job_id=443174407&repo=autoland&lineNumber=15282
| Assignee | ||
Updated•2 years ago
|
Comment 5•2 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 6•2 years ago
|
||
backed out by bug 1878862 patch.
This needs to handle malformed UTF-8 string, by extending XPCStringConvert::UTF8ToJSVal.
| Assignee | ||
Comment 7•2 years ago
|
||
Also backed out from 123 beta.
| Assignee | ||
Comment 8•2 years ago
|
||
| Assignee | ||
Comment 9•2 years ago
|
||
| Assignee | ||
Comment 10•2 years ago
|
||
| Assignee | ||
Comment 11•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 12•2 years ago
|
||
Comment 13•2 years ago
|
||
Comment 14•2 years ago
|
||
| bugherder | ||
Comment 15•2 years ago
|
||
| bugherder | ||
Description
•