Capturing telemetry data by dynamic language engine
First Claim
1. A method, implemented at a computer system that includes one or more processors, for communicating script call stacks associated with unhandled script exceptions across a security barrier between a scripting environment and a host environment at the computer system, the method comprising:
- presenting, at the one or more processors, a security barrier between a scripting environment that includes a script engine and a host environment that includes a host component, the host component maintaining execution control at the one or more processors when scripts are not being executed at the script engine, the security barrier being configured to separate the script engine from the host component, the security barrier including an interface for communicating script call stacks between the script engine and the host component;
during execution of script code at the script engine, detecting, by the script engine, that a first exception has been thrown by the script code, the first exception being an unhandled exception because the script code lacks code for handling the first exception, and performing at least the following based the first exception having been thrown by the script code;
the script engine capturing a first script call stack representing at least a portion of a script stack associated with execution of the script code at the script engine when the first exception was thrown, wherein capturing the first script call stack includes capturing the first script call stack in a host-accessible manner in which the first script call stack can be communicated to the host component using an object model of the host component;
the script engine completing unwinding of the script stack after capturing the first script call stack; and
the script engine communicating the first script call stack to the host component over the interface in the security barrier using the object model of the host component; and
during execution of the script code at the script engine, detecting, by the script engine, that a second exception has been thrown by the script code, the second exception being a handled exception because the script code includes code for handling the second exception, and performing at least the following based the second exception having been thrown by the script code;
the script engine capturing a second script call stack representing at least a portion of the script stack associated with execution of the script code at the script engine when the second exception was thrown, wherein capturing the second script call stack includes capturing the script call stack in a script-accessible manner;
the script engine abstaining from capturing any script call stack in the host-accessible manner; and
the script engine communicating the second script call stack to the script code.
2 Assignments
0 Petitions
Accused Products
Abstract
At least one embodiment described herein relates to the selective capturing of script code stacks associated with exceptions thrown by script code. For unhandled exceptions, the script engine 1) captures the script code stack in a host-accessible manner in which a host that hosts the script engine may access the captured script code stack, 2) completes unwinding of the script stack, and 3) reports the captured script code stack to a host that hosts the script engine. For at least one of the handled exceptions thrown by the script code for which the script code itself handles the exception, the script code stack is not captured in the host-accessible manner. Also, the call stack property of an error object is populated at throw time, rather than creation time.
-
Citations
20 Claims
-
1. A method, implemented at a computer system that includes one or more processors, for communicating script call stacks associated with unhandled script exceptions across a security barrier between a scripting environment and a host environment at the computer system, the method comprising:
-
presenting, at the one or more processors, a security barrier between a scripting environment that includes a script engine and a host environment that includes a host component, the host component maintaining execution control at the one or more processors when scripts are not being executed at the script engine, the security barrier being configured to separate the script engine from the host component, the security barrier including an interface for communicating script call stacks between the script engine and the host component; during execution of script code at the script engine, detecting, by the script engine, that a first exception has been thrown by the script code, the first exception being an unhandled exception because the script code lacks code for handling the first exception, and performing at least the following based the first exception having been thrown by the script code; the script engine capturing a first script call stack representing at least a portion of a script stack associated with execution of the script code at the script engine when the first exception was thrown, wherein capturing the first script call stack includes capturing the first script call stack in a host-accessible manner in which the first script call stack can be communicated to the host component using an object model of the host component; the script engine completing unwinding of the script stack after capturing the first script call stack; and the script engine communicating the first script call stack to the host component over the interface in the security barrier using the object model of the host component; and during execution of the script code at the script engine, detecting, by the script engine, that a second exception has been thrown by the script code, the second exception being a handled exception because the script code includes code for handling the second exception, and performing at least the following based the second exception having been thrown by the script code; the script engine capturing a second script call stack representing at least a portion of the script stack associated with execution of the script code at the script engine when the second exception was thrown, wherein capturing the second script call stack includes capturing the script call stack in a script-accessible manner; the script engine abstaining from capturing any script call stack in the host-accessible manner; and the script engine communicating the second script call stack to the script code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A computer program product comprising one or more hardware storage devices having stored thereon computer-executable instructions that, when executed by one or more processors of a computer system, cause the computer system to communicate script call stacks associated with unhandled script exceptions across a security barrier between a scripting environment and a host environment at the computer system, including at least the following:
-
presenting, at the one or more processors, a security barrier between a scripting environment that includes a script engine and a host environment that includes a host component, the host component maintaining execution control at the one or more processors when scripts are not being executed at the script engine, the security barrier being configured to separate the script engine from the host component, the security barrier including an interface for communicating script call stacks between the script engine and the host component; during execution of script code at the script engine, detecting, by the script engine, that a first exception has been thrown by the script code, the first exception being an unhandled exception because the script code lacks code for handling the first exception, and performing at least the following based the first exception having been thrown by the script code; the script engine capturing a first script call stack representing at least a portion of a script stack associated with execution of the script code at the script engine when the first exception was thrown, wherein capturing the first script call stack includes capturing the first script call stack in a host-accessible manner in which the first script call stack can be communicated to the host component using an object model of the host component; the script engine completing unwinding of the script stack after capturing the first script call stack; and the script engine communicating the first script call stack to the host component over the interface in the security barrier using the object model of the host component; and during execution of the script code at the script engine, detecting, by the script engine, that a second exception has been thrown by the script code, the second exception being a handled exception because the script code includes code for handling the second exception, and performing at least the following based the second exception having been thrown by the script code; the script engine capturing a second script call stack representing at least a portion of the script stack associated with execution of the script code at the script engine when the second exception was thrown, wherein capturing the second script call stack includes capturing the script call stack in a script-accessible manner; the script engine abstaining from capturing any script call stack in the host-accessible manner; and the script engine communicating the second script call stack to the script code. - View Dependent Claims (15, 16)
-
-
17. A computer system, comprising:
-
one or more processors; and one or more hardware storage devices having stored thereon computer-executable instructions that, when executed by the one or more processors, cause the computer system to communicate script call stacks associated with unhandled script exceptions across a security barrier between a scripting environment and a host environment at the computer system, including at least the following; presenting, at the one or more processors, a security barrier between a scripting environment that includes a script engine and a host environment that includes a host component, the host component maintaining execution control at the one or more processors when scripts are not being executed at the script engine, the security barrier being configured to separate the script engine from the host component, the security barrier including an interface for communicating script call stacks between the script engine and the host component; during execution of script code at the script engine, detecting, by the script engine, that a first exception has been thrown by the script code, the first exception being an unhandled exception because the script code lacks code for handling the first exception, and performing at least the following based the first exception having been thrown by the script code; the script engine capturing a first script call stack representing at least a portion of a script stack associated with execution of the script code at the script engine when the first exception was thrown, wherein capturing the first script call stack includes capturing the first script call stack in a host-accessible manner in which the first script call stack can be communicated to the host component using an object model of the host component; the script engine completing unwinding of the script stack after capturing the first script call stack; and the script engine communicating the first script call stack to the host component over the interface in the security barrier using the object model of the host component; and during execution of the script code at the script engine, detecting, by the script engine, that a second exception has been thrown by the script code, the second exception being a handled exception because the script code includes code for handling the second exception, and performing at least the following based the second exception having been thrown by the script code; the script engine capturing a second script call stack representing at least a portion of the script stack associated with execution of the script code at the script engine when the second exception was thrown, wherein capturing the second script call stack includes capturing the script call stack in a script-accessible manner; the script engine abstaining from capturing any script call stack in the host-accessible manner; and the script engine communicating the second script call stack to the script code. - View Dependent Claims (18, 19, 20)
-
Specification