Reviewed by Darin Adler.
[WebKit-https.git] / WebCore / bridge / runtime_object.cpp
index 62f3989..248f12a 100644 (file)
@@ -35,9 +35,10 @@ using namespace Bindings;
 const ClassInfo RuntimeObjectImp::info = { "RuntimeObject", 0, 0 };
 
 RuntimeObjectImp::RuntimeObjectImp(PassRefPtr<Bindings::Instance> i)
-: instance(i)
+    : instance(i)
 {
     instance->rootObject()->addRuntimeObject(this);
+    Collector::collectOnMainThreadOnly(this);
 }
 
 RuntimeObjectImp::~RuntimeObjectImp()