mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
disable memory specs which weren't working on 1.8
This commit is contained in:
parent
72e7924bf1
commit
2642cbd4ae
6 changed files with 21 additions and 13 deletions
|
@ -30,7 +30,7 @@ describe C::Context do
|
|||
one();
|
||||
JS
|
||||
trace.length.should be(4)
|
||||
trace.first.tap do |frame|
|
||||
trace.to_a[0].tap do |frame|
|
||||
frame.line_number.should == 10
|
||||
frame.column.should == 16
|
||||
frame.script_name.should == 'trace.js'
|
||||
|
|
|
@ -24,11 +24,15 @@ module V8::ExtSpec
|
|||
end
|
||||
|
||||
def ruby_gc
|
||||
current = GC.stress
|
||||
GC.stress = true
|
||||
if GC.respond_to?(:stress)
|
||||
current = GC.stress
|
||||
GC.stress = true
|
||||
end
|
||||
yield
|
||||
ensure
|
||||
GC.stress = current
|
||||
if GC.respond_to?(:stess)
|
||||
GC.stress = current
|
||||
end
|
||||
end
|
||||
|
||||
def v8_gc
|
||||
|
|
|
@ -38,4 +38,5 @@ describe "Memory:" do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
#These don't work in 1.8.7. Can't determine why not. I'll probably have to come back to this.
|
||||
end if RUBY_VERSION >= '1.9.2'
|
|
@ -17,5 +17,6 @@ describe V8::C::Object do
|
|||
v8_eval('o').Get(c::String::New("foo")).Utf8Value().should == "bar"
|
||||
v8_eval('o').object_id.should_not be(old_id)
|
||||
end
|
||||
end
|
||||
#can't quite get this to work in 1.8. I'm questioning if it's worth the effort
|
||||
end if RUBY_VERSION >= "1.9.2"
|
||||
end
|
|
@ -1 +1 @@
|
|||
Subproject commit ff7bd687925baf2c207a987c9dc973452236415f
|
||||
Subproject commit 162d1e5dfb674346657807c9662a9a20a355b2fd
|
|
@ -46,7 +46,7 @@ describe V8::Portal::Proxies do
|
|||
v8_gc()
|
||||
end
|
||||
end
|
||||
end
|
||||
end if RUBY_VERSION >= "1.9.2"
|
||||
end
|
||||
|
||||
context "for a JavaScript objects which are embedded into Ruby" do
|
||||
|
@ -66,9 +66,9 @@ describe V8::Portal::Proxies do
|
|||
it "will not a proxy twice if the proxy creator block actually registers the proxy inside it" do
|
||||
target = Object.new
|
||||
proxy = c::Object::New()
|
||||
expect {subject.rb2js(target) do |object|
|
||||
expect {subject.rb2js(target) do |object|
|
||||
subject.register_javascript_proxy(proxy, :for => object)
|
||||
c::Object::New()
|
||||
c::Object::New()
|
||||
end}.should_not raise_error
|
||||
subject.rb2js(target).should be(proxy)
|
||||
end
|
||||
|
@ -92,7 +92,7 @@ describe V8::Portal::Proxies do
|
|||
v8_gc
|
||||
end
|
||||
end
|
||||
end
|
||||
end if RUBY_VERSION >= "1.9.2"
|
||||
|
||||
context "looking up a Ruby object from a random JavaScript object" do
|
||||
it "checks first if it's a native Ruby object with a javascript proxy" do
|
||||
|
@ -180,8 +180,10 @@ describe V8::Portal::Proxies do
|
|||
|
||||
after do
|
||||
ruby_gc do
|
||||
@after.each(&:call) if @after
|
||||
@after.each do |proc|
|
||||
proc.call
|
||||
end if @after
|
||||
end
|
||||
end
|
||||
end if RUBY_VERSION >= '1.9.2'
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue