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 upRemove SubpageId. #7792
Remove SubpageId. #7792
Conversation
This changes PipelineId to be a UUID and removes the concept of SubpageId. Iframes are now able to generate their own pipeline ID during navigation which simplifies a lot of logic in other parts of the code. Other parts of the code, such as the compositor and layout only ever deal with pipeline ids.
highfive
commented
Sep 29, 2015
|
@jdm @Ms2ger What are your thoughts on this change? I thought I'd prototype this and I think it worked out OK. All the ref, wpt and css tests pass, and real web sites I've tested seem to work OK. I haven't been able to test with servo-shell yet, as it's broken in other ways at the moment. But I wanted to get your thoughts on whether this was a reasonable approach, and if so I'll do a bit more testing before I get you to review it. |
|
I admit that this change makes me nervous due to the possibility of UUID collision, but I don't actually know how concerned I should be about that. |
|
|
|
The last two paragraphs of https://en.wikipedia.org/wiki/Universally_unique_identifier#Random_UUID_probability_of_duplicates are informative. |
|
True! That being said, I am also concerned about multiprocess Servo where each content process is using a different seed, which the article does call out as a separate problem. |
…eate pipeline IDs. This is currently the constellation, and each script thread that is created. This guarantees that pipeline IDs are unique, without relying on UUIDs. Each time a new script thread is created, the constellation passes through a new namespace identifier.
|
@jdm What about something like the last commit? PipelineId becomes a tuple of (namespace id, index) and there is a namespace per script thread (plus the constellation). I'm not sure about the naming of the structs, but the concept seems reasonable to me. Thoughts? |
|
I don't have a good mental model of what these are used for. Could an attacker gain anything by causing collisions? |
|
I'm not sure - perhaps - but I prefer the changes in the last commit anyway, which remove the reliance on UUIDs and guarantee a unique pipeline ID. |
|
Removing in favour of doing this in small increments - first step is #7807 |
glennw commentedSep 29, 2015
This changes PipelineId to be a UUID and removes the concept of SubpageId.
Iframes are now able to generate their own pipeline ID during navigation which simplifies a lot of logic in other parts of the code.
Other parts of the code, such as the compositor and layout only ever deal with pipeline ids.