This repository has been archived by the owner. It is now read-only.
Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upStrokeOptions is meant to be immutable and add JoinStyle and CapStyle. #145
Conversation
andreasgal
added a commit
to andreasgal/servo
that referenced
this pull request
Feb 20, 2015
This comment has been minimized.
This comment has been minimized.
jdm
commented on src/azure_hl.rs in 16cca6b
Feb 20, 2015
|
This will dangle if the vector that dash_pattern is sliced from is reallocated or freed. That's scary. |
This comment has been minimized.
This comment has been minimized.
jdm
commented on src/azure_hl.rs in 16cca6b
Feb 20, 2015
|
If this is |
src/azure_hl.rs
Outdated
| #[allow(non_snake_case)] | ||
| pub struct StrokeOptions { | ||
| pub line_width: AzFloat, | ||
| pub miter_limit: AzFloat, | ||
| pub mDashPattern: *mut AzFloat, | ||
| pub mDashPattern: *const AzFloat, |
This comment has been minimized.
This comment has been minimized.
Ms2ger
Feb 20, 2015
Contributor
I don't know this code, but could we store an &'a [AzFloat] instead? Then we'd have some protection against uafs.
|
We could store |
jdm
added a commit
that referenced
this pull request
Feb 20, 2015
StrokeOptions is meant to be immutable and add JoinStyle and CapStyle.
andreasgal
added a commit
to andreasgal/servo
that referenced
this pull request
Feb 20, 2015
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
andreasgal commentedFeb 20, 2015
In Moz2D StrokeOptions (and pretty much all structures) are meant to be immutable. This also hides some ugly pointer unboxing in rust-azure. Submitting a separate patch for servo.