Closed
Bug 1317179
Opened 8 years ago
Closed 8 years ago
Stylo: Use XPCOM string bindings instead of Gecko_Utf8SliceToString
Categories
(Core :: DOM: Animation, defect, P3)
Core
DOM: Animation
Tracking
()
RESOLVED
FIXED
mozilla53
People
(Reporter: birtles, Assigned: boris)
References
Details
Attachments
(2 files, 1 obsolete file)
In bug 1302949 I introduced some fairly clumsy string handling while we were waiting for bug 1294742 (actually bug 1295762) to land. I haven't looked into those bindings at all, but now that they've landed I wonder if we can:
* Use them in Servo_DeclarationBlock_SerializeOneValue[1]
* Drop Gecko_Utf8SliceToString[2]
[1] https://dxr.mozilla.org/servo/rev/38e97d26c6e812bb2a8ba3f46707625ee733e56e/ports/geckolib/glue.rs#503
[2] http://searchfox.org/mozilla-central/rev/4b6cab91f93c73ae591dafaea40fd5704b41810e/layout/style/ServoBindings.h#147
Reporter | ||
Updated•8 years ago
|
Priority: -- → P3
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → boris.chiou
Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8813619 [details]
Bug 1317179 - [Servo] Use XPCOM string bindings instead of Gecko_Utf8SliceToString.
https://reviewboard.mozilla.org/r/95054/#review95280
::: servo/ports/geckolib/glue.rs:493
(Diff revision 1)
> let property = get_property_name_from_atom(property, is_custom);
> let mut string = String::new();
> let rv = declarations.read().single_value_to_css(&property, &mut string);
> debug_assert!(rv.is_ok());
>
> - // FIXME: Once we have nsString bindings for Servo (bug 1294742), we should be able to drop
> + write!(unsafe { buffer.as_mut().unwrap() }, "{}", string).expect("Failed to copy string");
`&mut *` buffer should work here.
Attachment #8813619 -
Flags: review?(manishearth) → review+
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8813618 [details]
Bug 1317179 - Use nsAString as the parameter type and drop Gecko_Utf8SliceToString.
https://reviewboard.mozilla.org/r/95052/#review95282
Attachment #8813618 -
Flags: review?(manishearth) → review+
Assignee | ||
Comment 5•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8813619 [details]
Bug 1317179 - [Servo] Use XPCOM string bindings instead of Gecko_Utf8SliceToString.
https://reviewboard.mozilla.org/r/95054/#review95280
> `&mut *` buffer should work here.
Thanks, I will replace my code with "unsafe { &mut * buffer }".
Assignee | ||
Comment 6•8 years ago
|
||
I will create a PR and land the gecko-side change after bug 1317178 is merged to m-c.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8813619 -
Attachment is obsolete: true
Assignee | ||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Pushed by bchiou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/53d1dbd5e905
Use nsAString as the parameter type and drop Gecko_Utf8SliceToString. r=manishearth
Comment 11•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•