Jaime, what usage scenario are you targeting on? The function you wrote
captures
the current stack, so to capture running JS code, this function needs to be
called from inside it. How? And you can't call this function from another
thread, without stopping the V8 thread.
http://codereview.chromium.org/1694011/diff/1/3
File src/api.cc (right):
http://codereview.chromium.org/1694011/diff/1/3#newcode4028
src/api.cc:4028: inline int LineFromPosition(int position,
Please look at GetScriptLineNUmber in handles.cc.
http://codereview.chromium.org/1694011/diff/1/3#newcode4098
src/api.cc:4098: i::Handle<i::JSArray> stackFrame =
i::Factory::NewJSArray(4);
Why JSArray, not FixedArray?
http://codereview.chromium.org/1694011/diff/1/3#newcode4100
src/api.cc:4100: elements->set(0, script_name);
I'm not sure it is OK to return internal handle types. I think you need
to convert them.
http://codereview.chromium.org/1694011/show
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev