| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
git@scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend
|
| |
| |
| |
| |
| |
| | |
Also, have pushContext() return currentContext() for now, to
avoid crashing, and disable processing of __postInit__ property
in importExtension() for same reason.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With an object created by QScriptEngine::newObject(), it should
be possible to call QScriptValue::setClass() to dynamically
change the behavior of that object. Similarly, it should be
possible to promote plain script objects to QObject (QVariant)
wrappers by calling the overload of QScriptEngine::newQObject()
(newVariant()) that takes a script object as the first argument.
This commit implements this capability.
The premise is the (internal) QScriptObject class, which inherits
JSC::JSObject. It reimplements all the methods for getting/setting
properties etc. Then there's a level of indirection to facilitate
dynamic change of the class: Each QScriptObject can have a
delegate associated with it that will handle operations on the
object. By default there is no delegate, so the object behaves as
a normal JS object, as you expect. However, once a delegate is set
(e.g., when QScriptValue::setScriptClass() is called),
QScriptObject will give the delegate the chance to handle the
object operation.
In addition to a delegate implementation for QScriptClass-based
objects, there are also delegates for QObject and QVariant
wrappers. These replace the QObjectWrapperObject and
QVariantWrapperObject classes.
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
The old engine did it as well. Makes more tests pass.
|
| |
|
|
|
|
| |
(QScriptValue::objectId() and QScriptEnigne::objectById)
|
|
|
|
| |
There's an off-by-one issue that we just work around for now.
|
| |
|
|
|
|
| |
E.g. QScriptClass-based objects.
|
|
|
|
| |
Do it The right way(TM), by lazily wrapping JSC::ExecState objects.
|
| |
|
|
|
|
|
|
| |
It's possible that JSC evaluate() returns a completion of type
Throw without hadException() being true, so we need to store the
exception value explicitly.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Callable seems to work, HasInstance not quite there yet.
|
| |
|
|
|
|
|
| |
Enumeration is missing, as is the ability to change the class
of an object after it has been created.
|
|
|
|
| |
Not fully working yet, so disabled for now
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Makes variant conversion work for signal handlers.
|
|
|
|
|
| |
It doesn't give useful information but at least apps that try to
use it (e.g. the qscriptjstestsuite autotest) won't assert now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Conflicts:
src/script/api/qscriptable.cpp
src/script/api/qscriptclasspropertyiterator.cpp
src/script/api/qscriptcontext.cpp
src/script/api/qscriptengine.h
src/script/api/qscriptengineagent.cpp
src/script/api/qscriptextensionplugin.cpp
src/script/api/qscriptvalue.h
src/script/api/qscriptvalueiterator.cpp
src/script/parser/qscript.g
src/script/parser/qscriptast.cpp
src/script/parser/qscriptast_p.h
src/script/parser/qscriptastvisitor_p.h
src/script/parser/qscriptgrammar.cpp
src/script/parser/qscriptgrammar_p.h
src/script/parser/qscriptlexer.cpp
src/script/parser/qscriptlexer_p.h
src/script/parser/qscriptparser.cpp
src/script/parser/qscriptparser_p.h
src/script/parser/qscriptsyntaxchecker.cpp
src/script/qscriptable.h
src/script/qscriptable_p.h
src/script/qscriptarray_p.h
src/script/qscriptasm.cpp
src/script/qscriptasm_p.h
src/script/qscriptastfwd_p.h
src/script/qscriptastvisitor.cpp
src/script/qscriptbuffer_p.h
src/script/qscriptclass.cpp
src/script/qscriptclass.h
src/script/qscriptclass_p.h
src/script/qscriptclassdata.cpp
src/script/qscriptclassdata_p.h
src/script/qscriptclassinfo_p.h
src/script/qscriptclasspropertyiterator.h
src/script/qscriptclasspropertyiterator_p.h
src/script/qscriptcompiler.cpp
src/script/qscriptcompiler_p.h
src/script/qscriptcontext.h
src/script/qscriptcontext_p.cpp
src/script/qscriptcontext_p.h
src/script/qscriptcontextfwd_p.h
src/script/qscriptcontextinfo.cpp
src/script/qscriptcontextinfo.h
src/script/qscriptcontextinfo_p.h
src/script/qscriptecmaarray.cpp
src/script/qscriptecmaarray_p.h
src/script/qscriptecmaboolean.cpp
src/script/qscriptecmaboolean_p.h
src/script/qscriptecmacore.cpp
src/script/qscriptecmacore_p.h
src/script/qscriptecmadate.cpp
src/script/qscriptecmadate_p.h
src/script/qscriptecmaerror.cpp
src/script/qscriptecmaerror_p.h
src/script/qscriptecmafunction.cpp
src/script/qscriptecmafunction_p.h
src/script/qscriptecmaglobal.cpp
src/script/qscriptecmaglobal_p.h
src/script/qscriptecmamath.cpp
src/script/qscriptecmamath_p.h
src/script/qscriptecmanumber.cpp
src/script/qscriptecmanumber_p.h
src/script/qscriptecmaobject.cpp
src/script/qscriptecmaobject_p.h
src/script/qscriptecmaregexp.cpp
src/script/qscriptecmaregexp_p.h
src/script/qscriptecmastring.cpp
src/script/qscriptecmastring_p.h
src/script/qscriptengine.cpp
src/script/qscriptengine_p.cpp
src/script/qscriptengine_p.h
src/script/qscriptengineagent.h
src/script/qscriptengineagent_p.h
src/script/qscriptenginefwd_p.h
src/script/qscriptextensioninterface.h
src/script/qscriptextensionplugin.h
src/script/qscriptextenumeration.cpp
src/script/qscriptextenumeration_p.h
src/script/qscriptextqobject.cpp
src/script/qscriptextqobject_p.h
src/script/qscriptextvariant.cpp
src/script/qscriptextvariant_p.h
src/script/qscriptfunction.cpp
src/script/qscriptfunction_p.h
src/script/qscriptgc_p.h
src/script/qscriptglobals_p.h
src/script/qscriptmember_p.h
src/script/qscriptmemberfwd_p.h
src/script/qscriptmemorypool_p.h
src/script/qscriptnameid_p.h
src/script/qscriptnodepool_p.h
src/script/qscriptobject_p.h
src/script/qscriptobjectdata_p.h
src/script/qscriptobjectfwd_p.h
src/script/qscriptrepository_p.h
src/script/qscriptstring.cpp
src/script/qscriptstring.h
src/script/qscriptstring_p.h
src/script/qscriptsyntaxchecker_p.h
src/script/qscriptsyntaxcheckresult_p.h
src/script/qscriptvalue.cpp
src/script/qscriptvalue_p.h
src/script/qscriptvaluefwd_p.h
src/script/qscriptvalueimpl.cpp
src/script/qscriptvalueimpl_p.h
src/script/qscriptvalueimplfwd_p.h
src/script/qscriptvalueiterator.h
src/script/qscriptvalueiterator_p.h
src/script/qscriptvalueiteratorimpl.cpp
src/script/qscriptvalueiteratorimpl_p.h
src/script/visitors/qscriptprettypretty.cpp
src/script/visitors/qscriptprettypretty_p.h
src/script/visitors/qscriptxmlgenerator.cpp
src/script/visitors/qscriptxmlgenerator_p.h
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Not everything passes but at least nothing asserts anymore, so
the test runs to completion.
|
|
|
|
|
| |
Properties in the prototype chain are not ignored like they
should be, yet.
|
|
|
|
| |
call(), construct() etc.
|
| |
|
|
|
|
| |
JSC will throw an error.
|
|
|