- Most of util::memory has been moved into profile::mem, though the
`SizeOf` trait and related things remain in util::memory. The
`SystemMemoryReporter` code is now in a submodule
profile::mem::system_reporter.
- util::time has been moved entirely into profile::time.
- Most of util::memory has been moved into profile::mem, though the
`SizeOf` trait and related things remain in util::memory. The
`SystemMemoryReporter` code is now in a submodule
profile::mem::system_reporter.
- util::time has been moved entirely into profile::time.
There were a few things that were bothering me with `SetBody`:
* The 'Step 3' comment is in the wrong place
* The logic of 'Step 4' comes before 'Step 3'
* 'Step 5' was not documented
There were a few things that were bothering me with `SetBody`:
* The 'Step 3' comment is in the wrong place
* The logic of 'Step 4' comes before 'Step 3'
* 'Step 5' was not documented
Fixes#1871
I thought I'd take a look at this for a first contribution to servo. A couple of things I'm not 100% sure on are:
1) `get_proto_or_iface_array` returns a `*mut *mut JSObj`, which I'm assuming is really an array of pointers to `JSObj`s. So dropping its return value will drop the memory for the array of pointers. Do we also need to drop each element, or is that handled by GC?
2) Are there any tests I need to add for this? I don't know if there are existing leak tests, or if leaks are mostly discovered by profiling.
Based on [ebalint](https://github.com/ebalint)'s original patch, this commit implements the linear and radial gradients for the canvas. The PR also includes test cases.
Depends on #4623 and servo/rust-azure#136.
This addresses #849. This PR cannot land until the corresponding PR (https://github.com/servo/html5ever/pull/91) in html5ever lands. I've done some simple testing of this code, but I don't consider it thorougly tested yet. I wanted to start getting feedback about the overall design before I spend more time polishing the details, and testing.