aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/underlyingsourcecontainer.rs
diff options
context:
space:
mode:
authorgterzian <2792687+gterzian@users.noreply.github.com>2024-07-12 10:26:27 +0800
committergterzian <2792687+gterzian@users.noreply.github.com>2024-07-12 10:26:27 +0800
commit545423c20266270da9083ee7449d41c2cc1cc10a (patch)
tree9ce5d4457af8ba1ea81b528c66432013e3ec5e49 /components/script/dom/underlyingsourcecontainer.rs
parent81e17933f9c7e74107b6ee9f1b3545418ffdb649 (diff)
downloadservo-545423c20266270da9083ee7449d41c2cc1cc10a.tar.gz
servo-545423c20266270da9083ee7449d41c2cc1cc10a.zip
remove prototype setting on underlying source container
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,
)
}