args.GetReturnValue() whats the default

93 views
Skip to first unread message

David Xanatos

unread,
Mar 10, 2015, 2:39:19 PM3/10/15
to v8-u...@googlegroups.com
I'm porting a large project right now and ofter I head code the returned v8::Undefined(),
now we don't have a return like this but a args.GetReturnValue()... whats the default here, I guess I don't need to explicitly say args.GetReturnValue().SetUndefined(); or is the default SetNull?
Or will I experience crashes if I don't do any set once i finished porting?

Sven Panne

unread,
Mar 11, 2015, 4:05:35 AM3/11/15
to v8-u...@googlegroups.com
On Tue, Mar 10, 2015 at 7:39 PM, David Xanatos <xanato...@gmail.com> wrote:
I'm porting a large project right now and ofter I head code the returned v8::Undefined(),
now we don't have a return like this but a args.GetReturnValue()... whats the default here, I guess I don't need to explicitly say args.GetReturnValue().SetUndefined(); or is the default SetNull?

That's correct: The default return value is always "undefined", so you don't need to call SetUndefined() explicitly.
 
Or will I experience crashes if I don't do any set once i finished porting?

Nope, at least not because of that... ;-)

Reply all
Reply to author
Forward
0 new messages