aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2013-07-22 13:33:20 -0700
committerbors-servo <release+servo@mozilla.com>2013-07-22 13:33:20 -0700
commit25fdcb3dca2016196f9e7b5714004b88a524f9cc (patch)
treeeb5df097d318da9a2478dd09b12e81bfaff58df1 /src/components/script/dom
parent9b06d01891ed7e25f2d81bcbd128fd6c55b3b5b6 (diff)
parent4d76e7570ed410c5630699f55ac3e8de858cb052 (diff)
downloadservo-25fdcb3dca2016196f9e7b5714004b88a524f9cc.tar.gz
servo-25fdcb3dca2016196f9e7b5714004b88a524f9cc.zip
auto merge of #608 : kmcallister/servo/script-exit, r=metajack
Diffstat (limited to 'src/components/script/dom')
-rw-r--r--src/components/script/dom/node.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs
index e797adb3e12..0936b9e490b 100644
--- a/src/components/script/dom/node.rs
+++ b/src/components/script/dom/node.rs
@@ -223,6 +223,10 @@ impl<'self, View> AbstractNode<View> {
/// Sets the layout data, unsafely casting the type as layout wishes. Only layout is allowed
/// to call this. This is wildly unsafe and is therefore marked as such.
pub unsafe fn unsafe_set_layout_data<T>(self, data: @mut T) {
+ // Don't decrement the refcount on data, since we're giving it to the
+ // base structure.
+ cast::forget(data);
+
do self.with_mut_base |base| {
base.layout_data = Some(transmute(data))
}