Commit graph

590 commits

Author SHA1 Message Date
Nick Fitzgerald
9fbb5c720e Add a method for dumping self-contained HTML timeline profiles
This commit adds the `--profiler-trace-path` flag. When combined with `-p` to
enable profiling, it dumps a profile as a self-contained HTML file to the given
path. The profile visualizes the traced operations as a gant-chart style
timeline.
2016-04-27 18:35:17 -07:00
bors-servo
2729864af7 Auto merge of #10857 - servo:toml, r=nox
Simplify TOML syntax

* Sections like `[dependencies.foo]` can be entries in a `[dependencies]` section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)` conditions instead of exact target triples: https://github.com/rust-lang/cargo/pull/2328

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10857)
<!-- Reviewable:end -->
2016-04-26 15:46:37 -07:00
Simon Sapin
83b3ebf6ac Simplify TOML syntax
* Sections like `[dependencies.foo]` can be entries in a `[dependencies]`
  section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)`
  conditions instead of exact target triples:
  https://github.com/rust-lang/cargo/pull/2328
2016-04-26 23:51:36 +02:00
bors-servo
caba731da1 Auto merge of #10847 - servo:rustup-20160424, r=nox
Update rustc.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10847)
<!-- Reviewable:end -->
2016-04-26 14:41:54 -07:00
bors-servo
f773dc182b Auto merge of #10824 - asajeffrey:communicate-backtrace-on-panic, r=Manishearth
Communicate a backtrace to the constellation when panicking.

Send a representation of the backtrace from a pipeline thread to the constellation in the case of panic. This is the next step in communicating the backtrace to the browser chrome (#10334).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10824)
<!-- Reviewable:end -->
2016-04-26 13:17:33 -07:00
Alan Jeffrey
9153333f62 Communicate a backtrace to the constellation when panicking. 2016-04-26 11:31:36 -05:00
Ms2ger
40fdf450c8 Update rustc. 2016-04-26 09:52:09 +02:00
Keith Yeung
48b2e9c055 Add parsing of double values in style attributes 2016-04-25 01:09:30 -04:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
bors-servo
0a3a50a129 Auto merge of #10706 - zwn:unused-extern-crates, r=nox
Turn on unused-extern-crates warning.

As discussed in #9256. It should solve second half of the issue.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10706)
<!-- Reviewable:end -->
2016-04-22 13:40:38 -07:00
Zbynek Winkler
41c293293b Remove references to unused crates.
The cleanup is based on info from using "-W unused-extern-crates".
2016-04-22 22:20:06 +02:00
Zbynek Winkler
b021874ba0 Silence unused-extern-crates false positives.
Added #[allow(unused_extern_crates)] to silence false positives

 * bitflags, lazy_static and matches because macro_use
 * alloc_jemalloc because builtin crate

See https://github.com/rust-lang/rust/issues/30849
2016-04-22 22:20:05 +02:00
zakorgyula
95bebb9945 Remove extra definition of WHITESPACE under components/util/str.rs 2016-04-20 10:40:57 +02:00
Alan Jeffrey
cfb066ef20 Added a dedicated panic channel. 2016-04-19 09:08:44 -05:00
Corey Farwell
c37ab1facd Make read_resource_file param simpler and more idiomatic.
`<P: AsRef<Path>>` is also what `File::open` uses as a generic type for
the parameter.
2016-04-16 23:06:59 -04:00
Manish Goregaokar
f02fd6330f
Remove watcher threads; replace with more panic handler goodness 2016-04-15 01:52:33 +05:30
Alan Jeffrey
941093d983 Make add_panic_object in thread.rs borrow rather than own the object. 2016-04-14 10:24:20 -05:00
bors-servo
2b910678db Auto merge of #10587 - asajeffrey:add-failure-panic-message, r=Manishearth
Added panic message to failures.

Added the panic message to failures. This is a step towards #10334, since it gives us access to the panic error message when we fire a `mozbrowsererror` event. The remaining steps are also to record the backtrace, and to report the failure in the event.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10587)
<!-- Reviewable:end -->
2016-04-14 19:55:17 +05:30
Simon Sapin
6889f37d9e Remove the url! plugin.
In rust-url 1.0 the `Url` struct is going to have private fields, and there
is no way to to create an aribitrary one without going through the parser.

The plugin never had a clear demonstrated performance benefit,
it was made mostly because it was possible and relatively easy at the time.
2016-04-14 15:35:28 +02:00
Alan Jeffrey
8c0fa01884 Added panic message to failures. 2016-04-13 16:09:48 -05:00
Ulf Nilsson
d433fb01ed Share prefs to content processes
Without this `./mach run -b -- -M` would start fine but navigating to a site would fail with:

`thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'assertion failed: mozbrowser_enabled()', /Users/ulf/Documents/Code/servo/components/script/dom/htmliframeelement.rs:163`
2016-04-12 09:26:30 +02:00
Arnaud Marant
9b8f183cba Issue #10491 add HTMLInputElement attributes that reflect content identically
it uses a new version of string-cache https://github.com/servo/string-cache/pull/148
2016-04-12 00:15:57 +02:00
bors-servo
bc2237ea2b Auto merge of #10445 - metajack:enable-asmjs, r=jdm
Use better JS engine defaults

This adds in preferences for all the SM 39 available options (as
retrieved from Gecko), and uses the same defaults as Gecko. A few
properties are not supported yet, and incremental GC is still always
disabled regardless of the preference setting.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10445)
<!-- Reviewable:end -->
2016-04-12 02:37:05 +05:30
Ulf Nilsson
b631202e66 Fix sandboxing on OS X
The main issue was resources_dir_path. Every time it was called it would start from the executable's path and walk up the hierarchy to find a directory named "resources". The sandbox was granted permission to read from the found resources dir, but after the sandbox had been activated resources_dir_path would again start from the executable's path and try to find the resources dir. It would then fail with "Operation not permitted" when trying to canonicalize the path because it didn't have permissions to read metadata under ./target.

To fix this the resources dir path is now cached between resources_dir_path calls.
2016-04-09 11:32:50 +02:00
Jack Moffitt
1bec193415 Use better JS engine defaults
This adds in preferences for all the SM 39 available options (as
retrieved from Gecko), and uses the same defaults as Gecko. A few
properties are not supported yet, and incremental GC is still always
disabled regardless of the preference setting.

This also adds back in the options that were accidentally deleted when
\#10342 was rebased, which moved things from script_thread.rs to
script_runtime.rs.
2016-04-08 08:46:22 -06:00
UK992
7896a05543 Rename handler to hook 2016-04-08 13:10:30 +02:00
Manish Goregaokar
efa84862af
Remove str_to_string lint
Specialization makes all of the options equally efficient.
2016-04-08 06:44:57 +05:30
bors-servo
1a6245828a Auto merge of #10420 - asajeffrey:add-soft-fail-option, r=KiChjang
Added --soft-fail option.

At the moment, wptrunner always runs the WPT tests with `servo --hard-fail`. To test hardening, we need to switch off `--hard-fail`. This PR introduces a `--soft-fail` option to do that.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10420)
<!-- Reviewable:end -->
2016-04-07 10:48:10 +05:30
Ms2ger
c34578ca16 Remove some unused dependencies from util. 2016-04-06 11:15:57 +02:00
bors-servo
05a4dcdc3b Auto merge of #10329 - Manishearth:skip-backtrace, r=asajeffrey
Skip printing the backtrace for RecvError/SendError

We currently get tons of useless backtraces clogging up the output when we have a panic cascade. This adds a handler that outputs a single line when a thread panics due to a sender or receiver hanging up, since this is almost always due to a panic cascade.

We could add a commandline arg that gets us back the old behavior, though I'm not sure if this is necessary.

r? @asajeffrey

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10329)
<!-- Reviewable:end -->
2016-04-05 13:02:01 +05:30
Manish Goregaokar
a2c82a03ba Add option for printing full backtraces 2016-04-05 06:23:17 +05:30
Alan Jeffrey
8cc04913f7 Added --soft-fail option. 2016-04-04 19:23:06 -05:00
bors-servo
f6c2924936 Auto merge of #10360 - mbrubeck:die-opt, r=emilio
Remove unused -Z dump-display-list-optimized flag

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10360)
<!-- Reviewable:end -->
2016-04-03 18:35:01 +05:30
bors-servo
ea24389b85 Auto merge of #10114 - matthewbentley:master, r=Manishearth
Load prefs.json from profile-dir if --profile-dir is specified at launch

In response to #10098
Tries to load `prefs.json` from the profile-dir and merge them into the preferences if `--profile-dir` is specified at launch.  The profile-dir preferences take precedence over the default preferences, but command line preferences still take precedence over everything.

Also adds some tests for `prefs.rs`.  These rely on the contents of `resources/prefs.json` (at least `test_get_set_reset_extend()` does), so they may need to be re-worked a bit.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10114)
<!-- Reviewable:end -->
2016-04-02 08:33:42 +05:30
Matt Brubeck
9e66aa5465 Remove unused -Z dump-display-list-optimized flag 2016-04-01 19:47:12 -07:00
Matthew Bentley
324b4d1e6d Print errors to stderr 2016-04-01 21:40:03 -04:00
Matthew Bentley
d06def01ff Add testing for prefs
Also, spelling fix in opts.rs

Fix order of imports to satisfy the lint
Fix split line in test
Fix multi-line string
2016-04-01 21:39:56 -04:00
Matthew Bentley
3b93c9dde9 Add functionality to load prefs.json from profile-dir (as set with
--profile-dir on launch)

Use T: Read rather than File, so that read_prefs_from_file can be tested
2016-04-01 21:39:45 -04:00
Paul Rouget
e51a6309bf Make it possible to use preferences to configure webrender and titlebar 2016-04-01 15:40:31 +08:00
Manish Goregaokar
1aa6d558ac Lock stderr in custom panic handler 2016-04-01 11:20:18 +05:30
Manish Goregaokar
ed3f7f5818 Skip printing the backtrace for RecvError/SendError
We currently get tons of useless backtraces clogging up the output when we have a panic cascade. This adds a handler that outputs a single line when a thread panics due to a sender or receiver hanging up, since this is almost always due to a panic cascade.
2016-04-01 07:48:07 +05:30
Josh Matthews
04df5decee Avoid testing impossible file paths on Windows. 2016-03-28 23:16:10 -04:00
MovingtoMars
4e40fecbdd Fail cleanly instead of panicking for incorrect option arguments 2016-03-27 22:00:02 +13:00
bors-servo
4cb626ae29 Auto merge of #10204 - awalGarg:fix10161, r=Manishearth
Allow setting preferences to false in WPT tests

First patch to servo - apologies if I did something stupid :)

This is a fix for #10161. I have squashed the commits into one.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10204)
<!-- Reviewable:end -->
2016-03-27 00:46:55 +05:30
Awal Garg
b1ff30f752 Allow setting preferences to false in WPT tests. closes #10161 2016-03-26 23:53:56 +05:30
Alan Jeffrey
32c72f0925 Added ability to randomly kill pipelines to the constellation. 2016-03-26 09:11:28 -05:00
Corey Farwell
5efbf0fa8f Move util::str::parse_length into 'style' component.
The function is only used in the 'style' component, so we'll move it
there alongside other relevant parse functions.
2016-03-24 10:45:33 -04:00
bors-servo
6dbffb621c Auto merge of #10087 - DDEFISHER:master, r=jdm
add a new command line flag --profile-dir [path]

add a new command line flag --profile-dir [path] that stores an optional directory path in the Opts struct in opts.rs, creating the directory if it does not exist.

For the Implement HTTP authorization UI and persistent sessions student project.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10087)
<!-- Reviewable:end -->
2016-03-20 12:25:10 +05:30
bors-servo
8c92e3f32b Auto merge of #10075 - Ms2ger:deny-unsafe, r=jdm
Deny unsafe code in more crates.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10075)
<!-- Reviewable:end -->
2016-03-20 08:00:53 +05:30
Daniel
ddc96dca82 add a new command line flag --profile-dir [path] 2016-03-19 21:20:30 -04:00