Merge pull request #3959 from deepak1556/remote_object_patch

remote: support arguments of type Date
This commit is contained in:
Cheng Zhao 2015-12-31 18:46:22 +08:00
commit af5e76f6ae
4 changed files with 16 additions and 1 deletions

View file

@ -18,6 +18,8 @@ wrapArgs = (args, visited=[]) ->
type: 'array', value: wrapArgs(value, visited)
else if Buffer.isBuffer value
type: 'buffer', value: Array::slice.call(value, 0)
else if value instanceof Date
type: 'date', value: value.getTime()
else if value?.constructor.name is 'Promise'
type: 'promise', then: valueToMeta(value.then.bind(value))
else if value? and typeof value is 'object' and v8Util.getHiddenValue value, 'atomId'