Function chakracore_sys::JsDiagEvaluate [] [src]

pub unsafe extern "system" fn JsDiagEvaluate(
    expression: JsValueRef,
    stackFrameIndex: c_uint,
    parseAttributes: JsParseScriptAttributes,
    forceSetValueProp: bool,
    evalResult: *mut JsValueRef
) -> JsErrorCode

Evaluates an expression on given frame. Javascript String or ArrayBuffer (incl. ExternalArrayBuffer). Index of stack frame on which to evaluate the expression. Defines how expression (JsValueRef) should be parsed. - JsParseScriptAttributeNone when expression is a Utf8 encoded ArrayBuffer and/or a Javascript String (encoding independent) - JsParseScriptAttributeArrayBufferIsUtf16Encoded when expression is Utf16 Encoded ArrayBuffer - JsParseScriptAttributeLibraryCode has no use for this function and has similar effect with JsParseScriptAttributeNone Forces the result to contain the raw value of the expression result. Result of evaluation. evalResult when evaluating 'this' and return is JsNoError { "name" : "this", "type" : "object", "className" : "Object", "display" : "{...}", "propertyAttributes" : 1, "handle" : 18 }

evalResult when evaluating a script which throws JavaScript error and return is JsErrorScriptException
{
    "name" : "a.b.c",
    "type" : "object",
    "className" : "Error",
    "display" : "'a' is undefined",
    "propertyAttributes" : 1,
    "handle" : 18
}
</para>

The code JsNoError if the operation succeeded, evalResult will contain the result The code JsErrorScriptException if evaluate generated a JavaScript exception, evalResult will contain the error details Other error code for invalid parameters or API was not called at break The current runtime should be in debug state. This API can only be called when runtime is at a break.