mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
rename Portal::Constructor -> Portal::ConstructorAdapter, Function -> FunctionAdapter
This commit is contained in:
parent
6fa4389555
commit
809af78734
3 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
|
||||
module V8
|
||||
class Portal
|
||||
class Constructor
|
||||
class ConstructorAdapter
|
||||
attr_reader :template, :function, :exposed
|
||||
alias_method :exposed?, :exposed
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module V8
|
||||
class Portal
|
||||
class Function
|
||||
class FunctionAdapter
|
||||
|
||||
attr_reader :template, :function
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ module V8
|
|||
if constructor = @constructors[class_id]
|
||||
return constructor
|
||||
else
|
||||
constructor = @constructors[class_id] = Constructor.new(self, class_id)
|
||||
constructor = @constructors[class_id] = ConstructorAdapter.new(self, class_id)
|
||||
ObjectSpace.define_finalizer(ruby_class, bind(@constructors, :delete, class_id))
|
||||
return constructor
|
||||
end
|
||||
|
@ -29,7 +29,7 @@ module V8
|
|||
if fn = @methods[code.to_s]
|
||||
return fn
|
||||
else
|
||||
function = @methods[code.to_s] = Function.new(@portal, code)
|
||||
function = @methods[code.to_s] = FunctionAdapter.new(@portal, code)
|
||||
#TODO: test this weak behavior
|
||||
function.template.MakeWeak(0, bind(@methods, :delete, code.to_s))
|
||||
return function
|
||||
|
@ -38,7 +38,7 @@ module V8
|
|||
if fn = @procs[code]
|
||||
return fn
|
||||
else
|
||||
function = Function.new(@portal, code)
|
||||
function = FunctionAdapter.new(@portal, code)
|
||||
#TODO: test this weak behavior
|
||||
function.template.MakeWeak(0, bind(@procs, :delete, code))
|
||||
return function
|
||||
|
|
Loading…
Add table
Reference in a new issue