On Mon, Apr 1, 2013 at 3:15 PM, danijar <[email protected]> wrote:
> v8::Isolate* isolate = v8::Isolate::GetCurrent();
>> ...
>
>
> v8::InvocationCallback* function =
>> Function.target<v8::InvocationCallback>();
>
>
v8::Isolate* isolate = context->GetIsolate();
>> ... v8::Isolate* isolate = context->GetIsolate();
>
>
The error is a null-pointer exception. Are you 100% certain that the above
calls return non-NULL?
> v8::HandleScope handle_scope(args.GetIsolate());
>> if (first) first = false;
>> else printf(" ");
>> v8::String::Utf8Value str(args[i]);
>> const char* cstr = *str ? *str : "<string conversion failed>";
>> printf("%s", cstr);
>
>
FWIW, using printf() for this purpose is wayyyyy overkill (go look at the
internals of any printf() impl for why)., The first printf() can be
replaced by putchar(' ') and the second one with puts() (which adds a
newline to the end). i know this is a pedantic detail, and is not really
relevant for example code, but the problem is that people tend to
copy/paste example code for use in real programs, under the assumption that
the example code shows best practices (using printf() when one of its more
efficient counterparts will suffice is not best practice).
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.