From 2483541fb97e58f5d6123b7ebb4b67d868e36fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 10 Apr 2017 08:01:38 +0800 Subject: [PATCH] Bug 1325878: Allow creating empty Servo MediaList. r=xidorn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: H7owjPB8dRi Signed-off-by: Emilio Cobos Álvarez --- ports/geckolib/glue.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index c0d40c87a83..52ef5c95615 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -1192,6 +1192,14 @@ pub extern "C" fn Servo_DeclarationBlock_RemovePropertyById(declarations: RawSer remove_property(declarations, get_property_id_from_nscsspropertyid!(property, ())) } +#[no_mangle] +pub extern "C" fn Servo_MediaList_Create() -> RawServoMediaListStrong { + + let global_style_data = &*GLOBAL_STYLE_DATA; + Arc::new(global_style_data.shared_lock.wrap(MediaList::default())).into_strong() + +} + #[no_mangle] pub extern "C" fn Servo_MediaList_GetText(list: RawServoMediaListBorrowed, result: *mut nsAString) { read_locked_arc(list, |list: &MediaList| {