about summary refs log tree commit diff
path: root/src/rt/rust_cc.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-05-09 14:11:46 -0700
committerBrian Anderson <banderson@mozilla.com>2012-05-30 21:23:34 -0700
commit654f7e3086ba3e13c4c0621fe5839dd62edb581e (patch)
tree85b0fd9e8a8dc556a3ed76eed4811da7d08e9eab /src/rt/rust_cc.cpp
parent429f7e9e08efcaa2de7d50e444e533b38c52b2c8 (diff)
downloadrust-654f7e3086ba3e13c4c0621fe5839dd62edb581e.tar.gz
rust-654f7e3086ba3e13c4c0621fe5839dd62edb581e.zip
rustc: Make unique boxes self-describing
Diffstat (limited to 'src/rt/rust_cc.cpp')
-rw-r--r--src/rt/rust_cc.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rt/rust_cc.cpp b/src/rt/rust_cc.cpp
index 66f044b8ce9..4d6aaf02070 100644
--- a/src/rt/rust_cc.cpp
+++ b/src/rt/rust_cc.cpp
@@ -117,7 +117,9 @@ class irc : public shape::data<irc,shape::ptr> {
     }
 
     void walk_uniq2() {
-        shape::data<irc,shape::ptr>::walk_uniq_contents1();
+        rust_opaque_box *box = *(rust_opaque_box**)dp;
+        if (box)
+            shape::data<irc,shape::ptr>::walk_uniq_contents1();
     }
 
     void walk_rptr2() {
@@ -373,7 +375,9 @@ class mark : public shape::data<mark,shape::ptr> {
     }
 
     void walk_uniq2() {
-        shape::data<mark,shape::ptr>::walk_uniq_contents1();
+        rust_opaque_box *box = *(rust_opaque_box**)dp;
+        if (box)
+            shape::data<mark,shape::ptr>::walk_uniq_contents1();
     }
 
     void walk_rptr2() {