KJS
kjsinterpreter.cpp
void stopTimeoutCheck()
Stops measurement of execution time after the initial startTimeoutCheck() call.
Definition: kjsinterpreter.cpp:226
KJSObject globalObject()
Returns the object that is used as the global object during all script execution performed by this in...
Definition: kjsinterpreter.cpp:165
JSGlobalObject * globalObject() const
Returns the object that is used as the global object during all script execution performed by this in...
Definition: interpreter.cpp:352
JSValue is the base type for all primitives (Undefined, Null, Boolean, String, Number) and objects in...
Definition: value.h:58
static bool normalizeCode(const QString &codeIn, QString *codeOut, int *errLine=nullptr, QString *errMsg=nullptr)
Reformat the given script code to an easy to read format with only one statement per line.
Definition: kjsinterpreter.cpp:232
void ref()
KJSInterpreter()
Constructs an interpreter with a default global object.
Definition: kjsinterpreter.cpp:96
KJSInterpreter & operator=(const KJSInterpreter &other)
Assign another interpreter instance to this object.
Definition: kjsinterpreter.cpp:129
void setTimeoutTime(unsigned mSecs)
Call this function in preparation of startTimeoutCheck() to set the number of milliseconds that a scr...
Definition: kjsinterpreter.cpp:214
KJSContext * globalContext()
Returns a handle to the global execution context.
Definition: kjsinterpreter.cpp:157
virtual ExecState * globalExec()
Returns the execution state object which can be used to execute scripts using this interpreter at a t...
Definition: interpreter.cpp:483
void deref()
bool isException() const
Returns true if the script evaluation has caused an exception.
Definition: kjsinterpreter.cpp:81
Completion objects are used to convey the return status and value from functions.
Definition: completion.h:52
QString errorMessage() const
Returns the error message if this is an exception result.
Definition: kjsinterpreter.cpp:86
KJSResult & operator=(const KJSResult &)
Assigns the properties of another result object to this one.
Definition: kjsinterpreter.cpp:65
bool isEmpty() const const
A class representing a global object of an execution environment.
Definition: kjsobject.h:279
Interpreter objects can be used to evaluate ECMAScript code.
Definition: interpreter.h:56
JSObject * builtinObjectPrototype() const
Returns the builtin "Object.prototype" object.
Definition: interpreter.cpp:664
Completion evaluate(const UString &sourceURL, int startingLineNumber, const UChar *code, int codeLength, JSValue *thisV=nullptr)
Evaluates the supplied ECMAScript code.
Definition: interpreter.cpp:521
bool isValueCompletion() const
Returns true if this is a value completion, false otherwise.
Definition: completion.h:86
JSValue * value() const
Returns the value of this completion if it is of type value-completion, 0 otherwise.
Definition: completion.h:70
KJSResult evaluate(const QString &sourceURL, int startingLineNumber, const QString &code, KJSObject *thisValue=nullptr)
Evaluates a piece of code with a "this" set to (optionally set) value.
Definition: kjsinterpreter.cpp:172
QString message
void startTimeoutCheck()
Start measuring executing time until the timeout value specified via setTimeoutTime().
Definition: kjsinterpreter.cpp:220
~KJSInterpreter()
Destructs this interpreter and frees resources it has allocated.
Definition: kjsinterpreter.cpp:150
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 03:56:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 03:56:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.