Sorry for late reply.

I don't think V8 provides this information through API currently.

On Fri, Sep 26, 2008 at 3:12 PM, Elliot Glaysher <[EMAIL PROTECTED]> wrote:
> Feng (or another v8 expert):
>
> Is there any way to get the current line number of an executing
> javascript from within a C++ custom callback?
>
> With JSC, you can get this information from the ExecState object with
> exec->machine()->retrieveLastCaller(...), which pass back a bunch of
> information about the calling context, including the line number of
> the calling script, the url of the script file and the calling
> function. I can't find any equivalent to get the line number from
> within V8.
>
> I need this piece of information for writing the callbacks for the
> console functions. The current chrome build just has each
> console.{debug,error,info,log} message say that it occurred on line 0.
> My current patch to the webkit merge branch follows this precedent,
> but I'm wondering if there's anything I can do so that we pass the
> layout test which has the proper line numbers in it.
>
> -- Elliot
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to