Thank you Stephan, for the clarification. Actually, I'm interested in
the result of the expression. For instance, in the above example of
eval('a'+'b'), I'm trying to gather the string 'ab'. I'm wondering on
how to parse the args for this.Thank you, Ravi On Apr 17, 5:20 am, Stephan Beal <[email protected]> wrote: > 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 bealhttp://wanderinghorse.net/home/stephan/ -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
