aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/underlyingsourcecontainer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/underlyingsourcecontainer.rs')
-rw-r--r--components/script/dom/underlyingsourcecontainer.rs15
1 files changed, 3 insertions, 12 deletions
diff --git a/components/script/dom/underlyingsourcecontainer.rs b/components/script/dom/underlyingsourcecontainer.rs
index 3a0e2c23119..a6d6d750ce1 100644
--- a/components/script/dom/underlyingsourcecontainer.rs
+++ b/components/script/dom/underlyingsourcecontainer.rs
@@ -72,24 +72,15 @@ impl UnderlyingSourceContainer {
global: &GlobalScope,
underlying_source_type: UnderlyingSourceType,
) -> DomRoot<UnderlyingSourceContainer> {
- // Setting the underlying source dict as the prototype of the
+ // TODO: setting the underlying source dict as the prototype of the
// `UnderlyingSourceContainer`, as it is later used as the "this" in Call_.
- // TODO: is this a good idea?
- let cx = GlobalScope::get_cx();
- rooted!(in(*cx) let mut underlying_source_dict = UndefinedValue());
- if let UnderlyingSourceType::Js(ref js_source) = underlying_source_type {
- #[allow(unsafe_code)]
- unsafe {
- js_source.to_jsval(*cx, underlying_source_dict.handle_mut());
- }
- }
- rooted!(in(*cx) let mut underlying_source_dict_obj = underlying_source_dict.to_object());
+ // Is this a good idea?
reflect_dom_object_with_proto(
Box::new(UnderlyingSourceContainer::new_inherited(
underlying_source_type,
)),
global,
- Some(underlying_source_dict_obj.handle()),
+ None,
)
}