Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Fix the return value of a constructor that throws an error. | Ariya Hidayat | 2009-07-17 | 1 | -1/+3 | |
| | ||||||
* | implement cyclic prototype chain check | Kent Hansen | 2009-07-17 | 1 | -1/+12 | |
| | ||||||
* | make QScriptValue::toString() et al work when there's an exception | Kent Hansen | 2009-07-17 | 2 | -11/+78 | |
| | | | | | JSC refuses to call functions when there's an exception that hasn't been dealt with, so save the exception and restore it afterwards. | |||||
* | set correct property flags in newFunction() | Kent Hansen | 2009-07-17 | 1 | -2/+3 | |
| | ||||||
* | We cant rely on property attributes from JavaScriptCore for the setter and ↵ | Olivier Goffart | 2009-07-16 | 1 | -3/+3 | |
| | | | | getter | |||||
* | do the correct prototype check | Kent Hansen | 2009-07-16 | 1 | -2/+1 | |
| | | | | There was a bug in commit 1d56e14605d74aefb955bdd81ee4083131252c9e | |||||
* | start implementing constructors for QMetaObject wrappers | Kent Hansen | 2009-07-16 | 2 | -7/+13 | |
| | ||||||
* | fix bug in built-in print() function | Kent Hansen | 2009-07-16 | 1 | -3/+2 | |
| | | | | D'oh, inverse logic. | |||||
* | Convert the strings or number value to jscvalue when they are used with an ↵ | Olivier Goffart | 2009-07-16 | 3 | -22/+26 | |
| | | | | | | | engine Also change the stringValue not to be a pointer. This fixes a memory leak. | |||||
* | only set default prototype if resulting object has built-in Object prototype ↵ | Kent Hansen | 2009-07-16 | 1 | -1/+4 | |
| | | | | | | as its prototype port of commit 4182e9c4b2cbfcd0604c57da210e97d68cbbbb52 in qt/master. | |||||
* | compile when JIT is enabled | Kent Hansen | 2009-07-15 | 1 | -0/+1 | |
| | | | | NativeFunctionWrapper is typedef for JSFunction | |||||
* | don't try to be so clever | Kent Hansen | 2009-07-15 | 1 | -7/+4 | |
| | | | | | | If we implement the ability to change the global object, the global object pointer can change, so we need to keep a reference to the object if it's stored in a QScriptValue. | |||||
* | fix GC-related crash | Kent Hansen | 2009-07-15 | 1 | -2/+4 | |
| | | | | | | | For some reason our Global Object is not marked by the collector. This fixes the case when you invoke GC explicitly by calling collectGarbage(), but the issue is probably still there when GC is invoked implicitly. | |||||
* | fix some memory leaks | Kent Hansen | 2009-07-15 | 2 | -2/+7 | |
| | ||||||
* | avoid crashing when attempting to set this-object of global context | Kent Hansen | 2009-07-15 | 1 | -0/+4 | |
| | ||||||
* | initial attempt at implementing QScriptEngine::setGlobalObject() | Kent Hansen | 2009-07-15 | 2 | -7/+80 | |
| | | | | | Doesn't actually replace the global object, but rather has the standard global object act as a proxy to the custom one. | |||||
* | implement enumeration of custom script classes | Kent Hansen | 2009-07-15 | 1 | -3/+0 | |
| | ||||||
* | implement QObject wrapper caching (PreferExistingWrapperObject) | Kent Hansen | 2009-07-15 | 1 | -2/+12 | |
| | ||||||
* | implement QScriptEngine::isEvaluating() | Kent Hansen | 2009-07-15 | 1 | -3/+2 | |
| | ||||||
* | don't assert in QScriptEngine::setGlobalObject() | Kent Hansen | 2009-07-13 | 1 | -2/+2 | |
| | | | | allow stuff to run, even though it's likely to crash/not work... | |||||
* | add GC marking guards | Kent Hansen | 2009-07-13 | 1 | -7/+13 | |
| | | | | | Caller is responsible for calling marked() before mark(), otherwise you might get infinite recursion. | |||||
* | Merge branch 'qtscript-jsc-backend' of ↵ | Jedrzej Nowacki | 2009-07-13 | 3 | -268/+93 | |
|\ | | | | | | | git@scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend | |||||
| * | don't crash during GC if no prototype has been set for a metatype | Kent Hansen | 2009-07-10 | 1 | -4/+7 | |
| | | | | | | | | | | | | Also, have pushContext() return currentContext() for now, to avoid crashing, and disable processing of __postInit__ property in importExtension() for same reason. | |||||
| * | implement ability to dynamically change class of script objects | Kent Hansen | 2009-07-10 | 3 | -264/+86 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | |||||
* | | fix checkSyntax autotest. | Jedrzej Nowacki | 2009-07-13 | 3 | -17/+42 | |
| | | ||||||
* | | fix autotest canEvaluate. | Jedrzej Nowacki | 2009-07-13 | 2 | -5/+82 | |
|/ | ||||||
* | some small fixes/experiments | Kent Hansen | 2009-07-10 | 1 | -4/+20 | |
| | ||||||
* | register QScriptValue as meta-type | Kent Hansen | 2009-07-09 | 1 | -0/+2 | |
| | | | | The old engine did it as well. Makes more tests pass. | |||||
* | use JSC::call() and JSC::construct() | Kent Hansen | 2009-07-09 | 1 | -54/+2 | |
| | ||||||
* | Fix autotest checking QScriptValue::objectId method. | Jedrzej Nowacki | 2009-07-09 | 4 | -19/+29 | |
| | | | | (QScriptValue::objectId() and QScriptEnigne::objectById) | |||||
* | make arguments object work for native functions | Kent Hansen | 2009-07-09 | 1 | -1/+1 | |
| | | | | There's an off-by-one issue that we just work around for now. | |||||
* | use currentFrame instead of globalExec whenever we can | Kent Hansen | 2009-07-09 | 2 | -47/+47 | |
| | ||||||
* | support callees that are not function objects | Kent Hansen | 2009-07-09 | 2 | -5/+5 | |
| | | | | E.g. QScriptClass-based objects. | |||||
* | rewrite most of QScriptContext handling | Kent Hansen | 2009-07-08 | 6 | -82/+294 | |
| | | | | Do it The right way(TM), by lazily wrapping JSC::ExecState objects. | |||||
* | Fix engineDelete autotest. | Jedrzej Nowacki | 2009-07-08 | 4 | -4/+110 | |
| | ||||||
* | work on QScriptEngine::uncaughtException() | Kent Hansen | 2009-07-07 | 3 | -8/+22 | |
| | | | | | | 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. | |||||
* | mark the QScriptClass object prototype | Kent Hansen | 2009-07-07 | 1 | -0/+2 | |
| | ||||||
* | start to implement QScriptEngine::importExtension() | Kent Hansen | 2009-07-06 | 1 | -5/+200 | |
| | ||||||
* | implement QScriptEngine::availableExtensions() | Kent Hansen | 2009-07-06 | 2 | -3/+75 | |
| | ||||||
* | fix QScriptValue::construct() when argument is not array-like | Kent Hansen | 2009-07-06 | 2 | -4/+8 | |
| | ||||||
* | make QScriptClass::HasInstance extension work | Kent Hansen | 2009-07-06 | 2 | -2/+2 | |
| | ||||||
* | start implementing QScriptClass extensions | Kent Hansen | 2009-07-03 | 2 | -1/+50 | |
| | | | | Callable seems to work, HasInstance not quite there yet. | |||||
* | make more tests pass | Kent Hansen | 2009-07-03 | 2 | -4/+2 | |
| | ||||||
* | implement a fair amount of the QScriptClass functionality | Kent Hansen | 2009-07-02 | 4 | -15/+209 | |
| | | | | | Enumeration is missing, as is the ability to change the class of an object after it has been created. | |||||
* | first stab at implementing Qt property getter/setters | Kent Hansen | 2009-07-02 | 2 | -0/+7 | |
| | | | | Not fully working yet, so disabled for now | |||||
* | implement QScriptValue::QObjectMember property flag | Kent Hansen | 2009-07-02 | 1 | -0/+2 | |
| | ||||||
* | use the JSC::Getter and JSC::Setter flags | Kent Hansen | 2009-07-02 | 1 | -4/+2 | |
| | ||||||
* | don't crash if isFunction() is called with invalid JS value | Kent Hansen | 2009-06-30 | 1 | -1/+1 | |
| | ||||||
* | implement setting of default prototype in newQObject() | Kent Hansen | 2009-06-30 | 2 | -14/+51 | |
| | ||||||
* | implement name-based connection, make more tests work | Kent Hansen | 2009-06-30 | 1 | -7/+13 | |
| |