1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

expand the scope of the the gc stress block to include the registration. This seems to help the specs.

This commit is contained in:
Charles Lowell 2011-06-10 09:48:42 -05:00
parent 75675ddd6a
commit f4afc01ff7

View file

@ -12,11 +12,12 @@ describe V8::Portal::Proxies do
end
it "releases the hard reference if its corresponding javascript object has been garbage collected" do
rb_object = Object.new
js_proxy = c::Object::New()
subject.register_javascript_proxy js_proxy, :for => rb_object
rb_object = nil
ruby_gc do
rb_object = Object.new
js_proxy = c::Object::New()
subject.should be_empty
subject.register_javascript_proxy js_proxy, :for => rb_object
rb_object = nil
subject.should_not be_empty
v8_gc()
end