Closed
Bug 1591514
Opened 6 years ago
Closed 6 years ago
Improve support for literals on FakeString
Categories
(Core :: DOM: Bindings (WebIDL), task, P1)
Core
DOM: Bindings (WebIDL)
Tracking
()
RESOLVED
FIXED
mozilla72
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(2 files)
We could flag ourselves with DataFlags::Literal when we know we have a literal. And we can make the bindings code nicer in the process too. For example, this:
static const char16_t data[] = { 0 };
mName.Rebind(data, ArrayLength(data) - 1);
becomes:
mName.AssignLiteral(u"");
in the generated code.
![]() |
Assignee | |
Updated•6 years ago
|
Priority: -- → P1
![]() |
Assignee | |
Comment 1•6 years ago
|
||
![]() |
Assignee | |
Comment 2•6 years ago
|
||
Also removes some unused API bits to make the number of entry points smaller
and safer.
![]() |
Assignee | |
Comment 3•6 years ago
|
||
mName.AssignLiteral(u"");
I guess we could also try to special-case the empty-string common case to just call Truncate
...
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eed1acc4c779
part 1. Change bindings to use actual literal strings for string constants. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/e91fee31774b
part 2. Add assertions to FakeString that its mData is only initialized once and not used before initialization. r=mccr8
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eed1acc4c779
https://hg.mozilla.org/mozilla-central/rev/e91fee31774b
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox72:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
![]() |
||
Comment 6•6 years ago
|
||
bugherder landing |
You need to log in
before you can comment on or make changes to this bug.
Description
•