On Sun, Apr 17, 2011 at 4:18 AM, Chinnu <[email protected]> wrote:
> where eval_Handler is declared as follows:
> Handle<Value> DOMWindow_eval_Callback(const Arguments& args)
> {
> ......
> }
>
> I'm doing this to record the statements being evaluated by the
> function.
>
> Can anyone please suggest on the proper way to extract the statement/
> expression being passed to the eval function in the script using the
> args in the callback above?
>
You can't get the "raw" statements this way - what your function gets is the
RESULTS of the expressions passed to eval, not the expressions
themselves. e.g.:
eval( 'a'+'b');
your function gets the value 'ab', not the expression ('a'+'b').
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users