style: Clear the UA cache on shutdown.

MozReview-Commit-ID: KAGdhFb67hq
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-09-14 20:55:45 +02:00
parent cb31e782aa
commit 5be81d04a7
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 11 additions and 1 deletions

View file

@ -130,7 +130,7 @@ use style::stylesheets::{StylesheetContents, SupportsRule};
use style::stylesheets::StylesheetLoader as StyleStylesheetLoader;
use style::stylesheets::keyframes_rule::{Keyframe, KeyframeSelector, KeyframesStepValue};
use style::stylesheets::supports_rule::parse_condition_or_declaration;
use style::stylist::RuleInclusion;
use style::stylist::{RuleInclusion, Stylist};
use style::thread_state;
use style::timer::Timer;
use style::traversal::DomTraversal;
@ -186,6 +186,7 @@ pub extern "C" fn Servo_Shutdown() {
// The dummy url will be released after shutdown, so clear the
// reference to avoid use-after-free.
unsafe { DUMMY_URL_DATA = ptr::null_mut(); }
Stylist::shutdown();
}
unsafe fn dummy_url_data() -> &'static RefPtr<URLExtraData> {