Граф коммитов

524447 Коммитов

Автор SHA1 Сообщение Дата
Xidorn Quan b3e8f1b558 Bug 1346047 - Enable chrome style system mochitests and run style system mochitests on e10s. r=jmaher
MozReview-Commit-ID: 9Vj3mZL3IhJ

--HG--
extra : rebase_source : aaf926fa895c4d42da5b89ea7650a99f6967fec2
2017-03-10 12:38:38 +11:00
Masayuki Nakano 63c152d62f Bug 1345690 part.4 Rename JoinNodeTransaction::CheckValidity() to JoinNodeTransaction::CanDoIt() for consistency with other transaction classes r=m_kato
MozReview-Commit-ID: 3a5QXiofEL2

--HG--
extra : rebase_source : 40425f274eb69deea3e65cf1cdd35d2630fe4011
2017-03-10 13:46:27 +09:00
Masayuki Nakano 566c4af32a Bug 1345690 part.3 Rename DeleteTextTransaction::Init() to DeleteTextTransaction::CanDoIt() since it does not initialize anything and just checking if the text node is editable r=m_kato
MozReview-Commit-ID: EyqHjHF3Q8G

--HG--
extra : rebase_source : 8004a067bf7fb8aedef8dc67d9ebb72ce5f89755
2017-03-10 13:38:28 +09:00
Masayuki Nakano 22a5d6332f Bug 1345690 part.2 Make the constructor of DeleteRangeTransaction initialize all members instead of Init() r=m_kato
Similar to DeleteNodeTransaction, DeleteRangeTransaction should take all necessary information as its arguments.  However, different from DeleteNodeTransaction, this doesn't need to implement CanDoIt() since nobody checks the state.

MozReview-Commit-ID: 2Z9fNtGeJ9c

--HG--
extra : rebase_source : fe3f75126a8975a0edb00a6c0709134b0a0f4d87
2017-03-09 11:19:39 +09:00
Masayuki Nakano 579b4d1fcb Bug 1345690 part.1 Make the constructor of DeleteNodeTransaction initialize all necessary members instead of Init() r=m_kato
I'd like to make mNodeToDelete an owning-non-null member, but it's not cycle collector aware.  Therefore, this patch only changes mEditorBase from pointer to reference.

MozReview-Commit-ID: H3wxmN1t92s

--HG--
extra : rebase_source : ca9984b47c9d242f82e395773a9a7f534e60c022
2017-03-10 13:23:40 +09:00
Alex Chronopoulos 44ce83037f Bug 1345049 - Update cubeb from upstream to f07ee6d. r=kinetik
MozReview-Commit-ID: 9vApWUIieJH

--HG--
extra : rebase_source : 02de16b962218747a52b5c6f71c2d681b8485fc6
2017-03-09 19:47:39 +01:00
J.C. Jones a51561a1c4 Bug 1260318 - Scope U2F Soft Tokens to a single AppID r=qdot,rbarnes
This change includes the FIDO "App ID" as part of the function used to generate
the wrapping key used in the NSS-based U2F soft token, cryptographically binding
the "Key Handle" to the site that Key Handle is intended for.

This is a breaking change with existing registered U2F keys, but since our soft
token is hidden behind a pref, it does not attempt to be backward-compatible.

- Updated for rbarnes' and qdot's reviews comments. Thanks!
- Made more strict in size restrictions, and added a version field
  to help us be this strict.
- Bugfix for an early unprotected buffer use (Thanks again rbarnes!)
- Fix a sneaky memory leak re: CryptoBuffer.ToSECItem

MozReview-Commit-ID: Jf6gNPauT4Y

--HG--
extra : rebase_source : 4ff5898e93e4a0a75576e5e54035a1cb6dd952d7
2017-02-01 15:21:04 -07:00
JW Wang 3be61ebd8d Bug 1345753 - Pass the event target to the CDMProxy constructor. r=cpearce
MozReview-Commit-ID: 94QzJ5FnGDo

--HG--
extra : rebase_source : b863f95c7906327f00eb8e08dd5b7f37a3b3cc6c
extra : source : 6e6242c50af23128b23d3b955a081481cec0b6e2
2017-03-09 14:58:18 +08:00
JW Wang b16e3e3861 Bug 1345751. P2 - use SystemGroup to dispatch the event. r=cpearce
MozReview-Commit-ID: B8HuIpbpm06

--HG--
extra : rebase_source : d53592ef53aa83ac19082969177d13c3cf25ec54
extra : source : ff8f5f44638293712058f4a39be42c959e81f308
2017-03-09 14:46:58 +08:00
JW Wang 9a968fa4e3 Bug 1345751. P1 - remove the else branch for MediaShutdownManager ensures all media activities are finished before "xpcom-shutdown-threads" starts. r=cpearce
MozReview-Commit-ID: BdNnlHEb1Nk

--HG--
extra : rebase_source : c591fe6cf1fbe95fec4459b6129e1aca5b6d7eef
extra : source : fa7f0e9676a271da0d7693d4a6a8c63862187fee
2017-03-09 14:45:09 +08:00
Henrik Skupin 7c4d3ea96b Bug 1330348 - Make forward- and backward commands synchronous. r=ato
Both `goBack` and `goForward` commands should not return immediately,
but when the requested page has been fully loaded. To handle that a general
`waitForPageUnloaded` method has been added, which will call
`pollForReadyState` when necessary.

Similar to `get` the dispatcher cannot be used due to possible remoteness
changes. As such the driver has to poll the framescript until the page load
has been finished.

MozReview-Commit-ID: 4F7Piymxwhs

--HG--
extra : rebase_source : 58084cb9fa8ac96ced4ff5d719dd55cbb0dafa03
2017-03-06 14:14:21 +01:00
Henrik Skupin 275f3c88d7 Bug 1330348 - Make pollForReadyState a shared method for navigation commands. r=ato
All navigation commands including get, goBack, goForward, and maybe others
in the future should rely on the same method for fetching the readyState of
a document. As such prepare `pollForReadyState` and `get` for the upcoming
usage.

MozReview-Commit-ID: 5Y4U9dgM7uj

--HG--
extra : rebase_source : f66908fbe013fd961468679862db4caa77230ec9
2017-03-09 11:21:30 +01:00
Xidorn Quan 6eb58892f8 Bug 1345343 - Add a pref to turn off effect of xml:base on style attribute. r=bz
MozReview-Commit-ID: EzNLxIW0OCv

--HG--
extra : rebase_source : 7c6d1278ed47d35b109bbe3e6305032b7f125fa4
2017-03-10 18:04:34 +11:00
Sam Giles aaf9f3b7ae servo: Merge #15903 - Set Origin header in http_network_or_cache_fetch (from servo:set-origin-header); r=Wafflespeanut
Source-Repo: https://github.com/servo/servo
Source-Revision: a11a3fe68bad97970568f7d785a41bd00b707e92

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a21445cd2ebf1eba3752ed0be5c48f48b3b46cb1
2017-03-09 22:15:11 -08:00
Xidorn Quan 49d319b27e servo: Merge #15901 - Restore text-align-last removed in #15839 by mistake (from upsuper:text-align-last); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 72128de68189a9cd03050b3b0dc8278b4ca376e9

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 631830a397a37f32274b47e1003772034f60632e
2017-03-09 21:03:10 -08:00
Hiroyuki Ikezoe 889e2fd23c Bug 1341985 - Update mochitest expectation. r=heycam
Following tests are for transitions.
 * test_animations_event_handler_attribute.html
 * test_animations_event_order.html

Following tests are using cssRules.
 * test_animations_dynamic_changes.html
 * test_bug716226.html

MozReview-Commit-ID: L5LlvnlgqTN

--HG--
extra : rebase_source : cc5957e7d5e74fdb9c17d1251fdcff2782087695
2017-03-10 12:12:54 +09:00
Hiroyuki Ikezoe cce97dde89 Bug 1341985 - Update CSS animation's reftest.list for stylo. r=heycam
MozReview-Commit-ID: 7eHga0F2JG5

--HG--
extra : rebase_source : f5facde9193c58b83834eb8286d61a646a345748
2017-03-10 12:12:54 +09:00
Hiroyuki Ikezoe 82007eb538 Bug 1341985 - Use registerCleanupFunction to restore to normal refresh mode. r=heycam
Otherwise, the refresh driver left under test mode when a javascript error
occurs in the middle of tests.

MozReview-Commit-ID: J7oUuuYhTZ1

--HG--
extra : rebase_source : 16467b780007eeacd0e70f581ca01ab6f778dfd7
2017-03-10 12:12:54 +09:00
Hiroyuki Ikezoe 2eb4e20a24 Bug 1341985 - Call UpdateAnimations even if the element has no computed values. r=birtles,heycam
MozReview-Commit-ID: 2dgAF7WOWxr

--HG--
extra : rebase_source : 8c2378d8d45484f206b4c890e89271fc95691ac3
2017-03-10 11:53:19 +09:00
Hiroyuki Ikezoe 5bfe316f81 Bug 1341985 - Skip update_animations if we have no running animations and the element becomes display:none. r=heycam
MozReview-Commit-ID: Ig81NKtXB85

--HG--
extra : rebase_source : 6d6d3f4794b83f5bc2b45bf2b6684f8c80064b32
2017-03-10 11:53:19 +09:00
Hiroyuki Ikezoe 495625f374 Bug 1341985 - GetAnimationCollection() takes const Element*. r=birtles
MozReview-Commit-ID: BPVROi9Ewzc

--HG--
extra : rebase_source : 599efa0aead37874e4e1c43ab793476d4adfe41d
2017-03-10 11:53:19 +09:00
Hiroyuki Ikezoe 96240dbfc8 Bug 1341985 - Update CSS animations in a SequentialTask. r=heycam
We create the SequentialTask only if:

* We have no old computed values and we have animation name style in the new
  computed values.
* Any animation properties is changed.
* display property is changed from 'none' and we have animation name style.
* display property is changed to 'none'.

In a subsequent patch we skip the SequentialTask if we have no running
animations and the display propery is changed to 'none'.

MozReview-Commit-ID: JRSZznufOS2

--HG--
extra : rebase_source : 566026c21c6357f77df55e3bd588835f5fd6c3d4
2017-03-10 11:53:19 +09:00
Hiroyuki Ikezoe 11184fb1e8 Bug 1341985 - Trigger the second traversal for updating CSS animations in the case of Servo_ResolveStyleLazily. r=heycam
MozReview-Commit-ID: 7E4unP9M7FQ

--HG--
extra : rebase_source : ee43d00ab84bcd6071ee7bb4cc1de4438229ea1b
2017-03-10 11:53:19 +09:00
Hiroyuki Ikezoe 843466ec0d Bug 1341985 - Trigger the second traversal for updating CSS animations. r=birtles,heycam
The restyle request during restyling is a result of creating/updating/removing
CSS animations that will come from a SequentialTask which will be implemented
in a subsequent patch.

MozReview-Commit-ID: JoAqvcN3y51

--HG--
extra : rebase_source : fdff59771b81518509dfd52e73d3f63ddb82390d
2017-03-10 11:53:19 +09:00
Hiroyuki Ikezoe 65b2567898 Bug 1341985 - Implement Gecko_StyleAnimationsEquals for checking nsStyleAutoArray<StyleAnimation> equality in servo side. r=heycam
Later we update CSS animations if this function returns false.

MozReview-Commit-ID: 27FsYQ40gSv

--HG--
extra : rebase_source : a043282de6c8a50ed53a92de98ecf93eb042f188
2017-03-10 11:53:17 +09:00
Hiroyuki Ikezoe f53a6a1993 Bug 1341985 - Split nsStyleAutoArray into a new header to avoid including nsStyleStruct.h in ServoBindingTypes.h. r=birtles
MozReview-Commit-ID: CMJkds7TKH0

--HG--
extra : rebase_source : 091a7beed6a8d0361c917c43aca9d7880b1bb783
2017-03-10 11:53:17 +09:00
Hiroyuki Ikezoe 58ea47fbe4 Bug 1341985 - We call EnsureTimerStarted on the main-thread after the traversal. r=heycam
We end up calling it in SequentialTask for updating CSS animations.

MozReview-Commit-ID: 7ip5XzU0VFb

--HG--
extra : rebase_source : 53b867d90ceea1547a1d35901360f6de8705aa02
2017-03-10 11:53:17 +09:00
Hiroyuki Ikezoe 2505a45477 servo: Merge #15900 - Process css animations for gecko (from hiikezoe:process-css-animations); r=heycam
<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1341985 .

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's for stylo

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 63bed270734aee1956d1c1ec131aa1de9d5bb5a0

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 69544f0d05b3b246aaa3d206e46661e0bc18266f
2017-03-09 20:23:21 -08:00
Xidorn Quan eb74600c49 Bug 1346102 - Fix several expectation changes from #15896. 2017-03-10 16:11:05 +11:00
Ethan Tseng ed6b3c7377 Bug 1345322 - Add pref privacy.resistFingerprinting to firefox.js. r=Gijs
MozReview-Commit-ID: DNS5zitYNDF

--HG--
extra : rebase_source : 5fd25fd5c31f0ecbf28593cfe7b7f3cbf8e9a4fc
2017-03-09 18:08:48 +08:00
Nazım Can Altınova 96076cd4f0 servo: Merge #15896 - Change the predefined type of flex-basis and make gecko glue auto-generate (from canaltinova:flex-basis); r=Manishearth
Gecko [doesn't support](https://bugzilla.mozilla.org/show_bug.cgi?id=1105111) content value in flex-basis yet. We had to change the predefined type to `LengthOrPercentageOrAuto` in stylo build.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1331529](https://bugzilla.mozilla.org/show_bug.cgi?id=1331529)

<!-- Either: -->
- [X] These changes do not require tests because it's stylo glue change.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 8b8eb5e192295fb903db5855a8f7be85581461b7

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : de51e5d1f5e2e70e93141741ec77f9699afaea59
2017-03-09 18:46:37 -08:00
Aki Sasaki 09a3273546 bug 1344321 - remove linux64-pgo from target_tasks_mozilla_beta. r=dustin a=release
MozReview-Commit-ID: AVai8RLFTVo

--HG--
extra : rebase_source : 7ff580ef887b7f1bd4a8a055fc9bc9ec75f77b1a
2017-03-08 22:23:57 -08:00
Aki Sasaki 7d51677840 bug 1344321 - add nightly test support. r=dustin a=release
this patch:

- adds linux{32,64}-nightly/opt test platforms that mirror the non-nightly test platforms.

- adds an `include_nightly` per-project parameter; this is refered to in the default `target_task_method`.  It's still possible to launch custom `target_task_method`s to trigger nightlies against, say, try.

- adds a `filter_for_project` method in `target_tasks.py` that allows for `include_nightly` and `run_on_projects` filtering in the various `target_task_method`s.

- adds nightly filtering into the `TryOptionSyntax` object.  By default, this will be off.  To trigger nightly tests on try, either submit a new decision task with a different `target_task_method` (e.g. `nightly_fennec`) or flip the `include_nightly` flag to True.

- adds the `nightly` attribute to tests if their builds have that attribute.

MozReview-Commit-ID: DttIZH0BHS2

--HG--
extra : rebase_source : d8acbe4c741f570b2e8d33a8e6a7f5c791b24ff6
2017-03-09 16:32:41 -08:00
jeremychen@mozilla.com a0b2aad747 Bug 1345498 - [stylo] update mochitest expections for text-justify. r=xidorn
MozReview-Commit-ID: 3AtH1aOs6ov

--HG--
extra : rebase_source : 5ff2b07356189879d22b19a8285cbb9b8d1f5784
2017-03-10 11:09:20 +08:00
JW Wang 69e03d2bce Bug 1345713 - the seek promise might be rejected because the 'ended' event handler shut down the decoder. r=kaku
MozReview-Commit-ID: JuIXXDOATmu

--HG--
extra : rebase_source : 946d443da920a7a14b23491c956099630f94ad2f
extra : source : 2494048cfbd4f8bb501f025bc119825ffdef20a2
2017-03-09 11:20:05 +08:00
Jeremy Chen 5f0dc8711e servo: Merge #15839 - Stylo - gecko glue code for text-justify (from chenpighead:stylo-text-justify); r=upsuper
<!-- Please describe your changes on the following line: -->

Implement gecko glue for text-justify property.

Gecko has supported text-justify in [Bug 276079](https://bugzilla.mozilla.org/show_bug.cgi?id=276079), and going to pref-on on Nightly very soon in [Bug 1343512](https://bugzilla.mozilla.org/show_bug.cgi?id=1343512). Let's make it work for stylo.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: d124297456482df2536c49aa659634d4b9429e84

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 8d1907ce1ac9f13ed47f26c3968cb4d46de89367
2017-03-09 17:57:15 -08:00
jeremychen@mozilla.com d866c15716 Bug 1056516 - submit Hyphenation Control reftests to CSSWG. r=jfkthame
MozReview-Commit-ID: 636GBMjvej6

--HG--
extra : rebase_source : 3d4e8a9f06d3f3ea2c44d5618dfed85e44bb0551
2017-03-10 00:30:12 +08:00
jeremychen@mozilla.com e1982f47d8 Bug 1056516 - add tests to our local reftests folder. r=jfkthame
MozReview-Commit-ID: 1Az4xBe6Nts

--HG--
extra : rebase_source : 1dbac56b33380c37a81070b0439af1750f08ef81
2017-03-10 00:30:12 +08:00
jeremychen@mozilla.com 2cb71eafe4 Bug 1056516 - let auto hyphen honor manual hyphen when hyphens:auto is set. r=jfkthame
MozReview-Commit-ID: BWzg3pb2lDH

--HG--
extra : rebase_source : 069dc3091bf7600d4675fe9ea5d0b41bc70744ba
2017-03-10 00:30:11 +08:00
jeremychen@mozilla.com f4ac16bb05 Bug 1056516 - use HyphenType to store different types of hyphenations. r=jfkthame
MozReview-Commit-ID: 22ICYSaY1I2

--HG--
extra : rebase_source : 05e0a442dec8a8ac7f1b663808fc016ee3385aa2
2017-03-10 00:30:11 +08:00
jeremychen@mozilla.com 68ca87317f Bug 1056516 - use AutoTArray for hyphenBuffer in BreakAndMeasureText. r=jfkthame
MozReview-Commit-ID: 1fQGiosLYG

--HG--
extra : rebase_source : cdca8fa9f308d3676a09b2735a98c13bd2a2e2ef
2017-03-10 00:30:10 +08:00
Iris Hsiao effe8f959a Backed out 3 changesets (bug 1344346) for mochitest shutdownleaks
Backed out changeset 71e3443cdc43 (bug 1344346)
Backed out changeset cd8993e4d0dd (bug 1344346)
Backed out changeset 8e03e57d44aa (bug 1344346)
2017-03-10 10:44:13 +08:00
Fernando Jiménez Moreno f6f72ddd13 servo: Merge #15783 - Replace manual host parsing code with parse-host crate (from ferjm:issue15756-parse-hosts); r=avadacatavra
This patch is replacing the code to parse the hosts file with the [parse-hosts](https://crates.io/crates/parse-hosts) crate. This crate has a [CC0 1.0 Universal License](https://creativecommons.org/publicdomain/zero/1.0/deed.en).

I could have used [HostsFile::load()](https://clarcharr.github.io/parse-hosts/parse_hosts/struct.HostsFile.html#method.load) directly, but this method loads `/etc/hosts` by default and does not allow to override the default path (for example with [env::var("HOST_FILE")](https://dxr.mozilla.org/servo/source/components/net_traits/hosts.rs#19)), so I kept the existing code to open and read the content of `env::var("HOST_FILE")` and also kept the [parse_hostsfile](https://dxr.mozilla.org/servo/source/components/net_traits/hosts.rs#42) method (used by the unit tests), but I modified it to use [HostsFile::read_buffered](https://clarcharr.github.io/parse-hosts/parse_hosts/struct.HostsFile.html#method.read_buffered), which is doing the actual hosts parsing for a given string buffer.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15756 .
- [X] There are tests for these changes (tests/unit/net/resource_thread.rs and tests/unit/net/http_loader.rs)

Source-Repo: https://github.com/servo/servo
Source-Revision: 8f7c69e15f0b9beddad2ba67e3419f88aca0d579

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 1a04f0ca1484f93aa39e1f0d511a7b7d061e8afd
2017-03-09 17:17:14 -08:00
Manish Goregaokar 6a31ced725 Bug 1329093 - Part 5: Update test expectations; r=bz
MozReview-Commit-ID: 4mfC99WEQFG
2017-03-09 17:47:45 -08:00
Manish Goregaokar 7a6a00898d Bug 1329093 - Part 4: stylo: Delay SVG mapped attr resolution till later; r=bz
MozReview-Commit-ID: 2GvHPg1egjS
2017-03-09 17:46:26 -08:00
Manish Goregaokar bae202bd4f Bug 1329093 - Part 3: Overload FromContent() to work with const; r=bz
MozReview-Commit-ID: BUFmPtcf6LM
2017-03-09 17:46:23 -08:00
Manish Goregaokar 07fc7c5b25 Bug 1329093 - Part 1: stylo: Handle SVG presentation attributes; r=bz
MozReview-Commit-ID: 9cymo3c9HIn
2017-03-09 17:46:21 -08:00
Matthew Noorenberghe babe2119bc Bug 1344589 - Wait for the httpServer to shutdown in head_search.js to avoid reported leaks. r=adw
The test slow_timeout in test_searchSuggest.js was keeping a request open for 10s so the server wouldn't stop immediately.

MozReview-Commit-ID: EGFPRKMNa51

--HG--
extra : rebase_source : c22ddafaee9c4bf6142643782b53f3d4313531d8
2017-03-09 00:18:35 -05:00
Grigory Kruglov 9c2a8e93e0 Bug 1329793 - Re-subscribe for a push channel periodically r=eoger,nalexander
On startup and at the beginning of a sync we check how long it has been since we've subscribed
to a channel for fxa service. If it's been over 21 days, request re-subscription.

MozReview-Commit-ID: GzvPecZ9hTy

--HG--
extra : rebase_source : d0292acddbdd231502808469d4e5502a4ac93779
2017-03-08 18:14:43 -08:00
Daniel Holbert 9a0f32abc3 Bug 1291483 part 2: Use UniquePtr/MakeUnique more thoroughly in chain-of-custody for gfxFont::mVerticalMetrics. r=jfkthame
This member-var has type 'UniquePtr', but (up until this patch) its value
is set up using "new" and raw pointers. This patch improves that codepath by
using UniquePtr & MakeUnique, for stronger ownership guarantees.

MozReview-Commit-ID: KWZVpvr9bYj

--HG--
extra : rebase_source : 4e46d355078c7da6ae750f3ca06586dc8703e8a7
2017-03-09 16:38:58 -08:00