Utility for calling into the JavaScript runtime.
@private Wrap JavaScript invocations with uniform error handling
@yield code to wrap
# File lib/less/parser.rb, line 11 def calljs lock do yield end rescue V8::JSError => e raise ParseError.new(e) end
@private Ensure proper locking before entering the V8 API
@yield code to wrap in lock
# File lib/less/parser.rb, line 23 def lock result, exception = nil, nil V8::C::Locker() do begin result = yield rescue Exception => e exception = e end end if exception raise exception else result end end
Generated with the Darkfish Rdoc Generator 2.