aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/FileAPI/blob/Blob-slice-overflow.html
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-03-15 03:03:53 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2016-03-15 03:03:53 +0530
commitaea8d8959dcb157a8cc381f1403246ce8ca1ca00 (patch)
tree57c79277ab7194f01846c088285f0d76f2a751e1 /tests/wpt/web-platform-tests/FileAPI/blob/Blob-slice-overflow.html
parent881d6b4220f2391a22d4ea73b79415071626501f (diff)
parent539f839958650a0f08f3db444e1d57494e0e9830 (diff)
downloadservo-aea8d8959dcb157a8cc381f1403246ce8ca1ca00.tar.gz
servo-aea8d8959dcb157a8cc381f1403246ce8ca1ca00.zip
Auto merge of #9976 - bholley:remove_trait_lifetimes, r=SimonSapin
Remove lifetimes from Style/Layout traits Right now, there's a huge amount of complexity in T{Node,Element,Document} and friends because of the lifetime parameter. Before I started generalizing this code for use by Gecko, these wrappers were plain structs. They had (and still have) a phantom lifetime associated with them to prevent references to DOM nodes from leaking past the end of restyle, when they might be invalidated by a GC. When I generalized them, I decided to put the lifetime on the trait as well, since there are some situations where the lifetime is, in fact, necessary. Specifically, they are necessary for the compiler to understand that all the things borrowed from all the nodes and elements and so on have the same lifetime (the lifetime of the restyle), rather than the lifetime of whichever particular element or node pointer the value was borrowed from. This come up in situations where we do |let el = node.as_element()| or |let n = el.as_node()| and then borrow something from the result. The compiler thinks the borrow lifetime is that of |el| or |n|, when it's actually longer. In practice though, I think the style and layout algorithms we use don't run into this issue much, and we can hack around it where it comes up. So I think we should remove the lifetimes from the traits, which will let us aggregate the embedding-provided traits together onto a single meta-trait and significantly simplify the code. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9976) <!-- Reviewable:end -->
Diffstat (limited to 'tests/wpt/web-platform-tests/FileAPI/blob/Blob-slice-overflow.html')
0 files changed, 0 insertions, 0 deletions