{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/6141","labels_url":"https://api.github.com/repos/servo/servo/issues/6141/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/6141/comments","events_url":"https://api.github.com/repos/servo/servo/issues/6141/events","html_url":"https://github.com/servo/servo/pull/6141","id":78267449,"number":6141,"title":"Upgrade to Spidermonkey 39","user":{"login":"michaelwu","id":719931,"avatar_url":"https://avatars.githubusercontent.com/u/719931?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelwu","html_url":"https://github.com/michaelwu","followers_url":"https://api.github.com/users/michaelwu/followers","following_url":"https://api.github.com/users/michaelwu/following{/other_user}","gists_url":"https://api.github.com/users/michaelwu/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelwu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelwu/subscriptions","organizations_url":"https://api.github.com/users/michaelwu/orgs","repos_url":"https://api.github.com/users/michaelwu/repos","events_url":"https://api.github.com/users/michaelwu/events{/privacy}","received_events_url":"https://api.github.com/users/michaelwu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/servo/servo/labels/S-awaiting-review","name":"S-awaiting-review","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"jdm","id":27658,"avatar_url":"https://avatars.githubusercontent.com/u/27658?v=3","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false},"milestone":null,"comments":16,"created_at":"2015-05-19T22:02:31Z","updated_at":"2015-05-20T20:18:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/6141","html_url":"https://github.com/servo/servo/pull/6141","diff_url":"https://github.com/servo/servo/pull/6141.diff","patch_url":"https://github.com/servo/servo/pull/6141.patch"},"body":"Here it is.\r\n\r\nThere's two major things that are unfinished here:\r\n- ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done.\r\n- Updating the Cargo.locks to point to the new SM and SM binding.\r\n\r\nI also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location.\r\n\r\nIncremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later.\r\n\r\nGenerational GC works. SM doesn't work without it.\r\n\r\nThe biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`.\r\n\r\nSupport for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it.\r\n\r\n`CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`.\r\n\r\n`RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case.\r\n\r\nThis has been tested with the following zeal settings:\r\n\r\nGC after every allocation\r\nJS_GC_ZEAL=2,1\r\n\r\nGC after every 100 allocations (important for catching use-after-free bugs)\r\nJS_GC_ZEAL=2,100\r\n\r\nVerify pre barriers\r\nJS_GC_ZEAL=4,1\r\n\r\nVerify post barriers\r\nJS_GC_ZEAL=11,1\r\n\r\n<!-- Reviewable:start -->\r\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/servo/servo/6141)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/104023000","html_url":"https://github.com/servo/servo/pull/6141#issuecomment-104023000","issue_url":"https://api.github.com/repos/servo/servo/issues/6141","id":104023000,"user":{"login":"bors-servo","id":4368172,"avatar_url":"https://avatars.githubusercontent.com/u/4368172?v=3","gravatar_id":"","url":"https://api.github.com/users/bors-servo","html_url":"https://github.com/bors-servo","followers_url":"https://api.github.com/users/bors-servo/followers","following_url":"https://api.github.com/users/bors-servo/following{/other_user}","gists_url":"https://api.github.com/users/bors-servo/gists{/gist_id}","starred_url":"https://api.github.com/users/bors-servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bors-servo/subscriptions","organizations_url":"https://api.github.com/users/bors-servo/orgs","repos_url":"https://api.github.com/users/bors-servo/repos","events_url":"https://api.github.com/users/bors-servo/events{/privacy}","received_events_url":"https://api.github.com/users/bors-servo/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T20:18:33Z","updated_at":"2015-05-20T20:18:33Z","body":":umbrella: The latest upstream changes (presumably #5858) made this pull request unmergeable. Please resolve the merge conflicts."}}