Hi,
I have a small bit of code that looks something like this:
(function (a, b, c) {
return {
read_something: function(i) { if (i < 0) this.die(); return a; }
};
});
I then do something like this:
comp = Script::Compile(code);
wrapper = comp->Run();
binder = wrapper->Call( global, 3, args );
global->Set( ident, binder );
which compiles, runs (to get the factory-function), then calls the factory-function with arguments,
resulting in the {} object with read_something function inside.
I then bind this to the global object.
I use this to give me access to data, but at the same time ensure the data is read-only.
This works well. If I call binder.read_something(-1) within javascript, it correctly dies when trying to call this.die().
However, the callstack that is printed out only shows the details for the code within the wrapper,
it does not print out the callstack up to the calling code (which is compiled and run later).
Any ideas why this might be? I am hoping to (eg) find the place where the calling script calls with a -1 parameter.
thanks,
Paul