Having to match the numbered results in /tmp with the failing tests was bothering me, and I figured it would be better to print the path with the failure.
Sometimes it's useful to bubble out the error from the URL parsing so the caller can deal with the result as per its needs.
[The XHR `open()`](http://xhr.spec.whatwg.org/#the-open()-method), for example, is one place where the bubbling out of an error is required.
Blocks #2282
The long-term plan for SpiderMonkey is to eliminate JSContexts by merging
(most of) it into JSRuntime, so to future-proof our code, we should avoid
creating multiple JSContexts for the same JSRuntime.
However, this implies we'll have to use the same JSContext for objects in
different compartments, so we need to enter compartments. This is done by
using the with_compartment function.
We can't replace the ones in the `style` crate because some functions expect generic `SmallVec`s.
I also did some reorganisation of the `smallvec` macros.
cc @pcwalton
The long-term plan for SpiderMonkey is to eliminate JSContexts by merging
(most of) it into JSRuntime, so to future-proof our code, we should avoid
creating multiple JSContexts for the same JSRuntime.
However, this implies we'll have to use the same JSContext for objects in
different compartments, so we need to enter compartments. This is done by
using the with_compartment function.
The `.encode()`s from where the unused_result warnings come from seem to wrap an `encode()` and return `Ok(())`.
They should probably bubble the result out.
This is a first step towards moving responsibility for default values into the
caller, which should improve their code (in particular for the dictionary
codegen.
This also introduces a Dictionary::empty function, whose implementation is a
hack. The implementation will be improved once its codegen has access to the
raw default values.
Besides dictionaries, this commit does not change the generated code.