Let's say I have a global C++ method wrapped for JavaScript usage --
let's call it CppSomeMethod().
Furthermore, let's say I have some two bodies of JavaScript code as
string contents which call this global C++ method:
JavaScript1.js:
...
function CallSomeMethod() {
CppSomeMethod();
}
...
JavaScript2.js:
...
function AlsoCallSomeMethod() {
CppSomeMethod();
}
...
Lastly, let's assume that all the template and context construction
and method wrapping is done correctly, such that CppSomeMethod() is
correctly invoked when the JavaScript executes.
Now I use v8::Script::Compile(<source>, <file_name>) on each to
compile the JavaScript from string contents and create multiple
v8::Script instances, and v8::Script::Run() to execute them. (The key
being that CppSomeMethod() can be invoked from multiple scripts...)
Here's my question: in the body of CppSomeMethod(), is there any way I
can obtain the origin (value of <file_name> above) of the script which
caused the invocation of CppSomeMethod()?
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users