aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8/qjsvalue_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Move the JS Api into it's own folderLars Knoll2013-08-081-99/+0
| | | | | Change-Id: I7ef371ff929387097862121b73a7a5863b51ccf1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix tst_qjsvalue::engineDeleted()Simon Hausmann2013-06-211-20/+3
| | | | | | | | Move the engine pointer from QJSValuePrivate to PersistentValuePrivate and set it back to null in the memory manager destructor. Change-Id: I904b365221e1559701353cb359eac768928ad918 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix memory corruption in qjsvalueprivateLars Knoll2013-06-171-11/+1
| | | | | | | | | | When converting to a memory managed string, we need to add the PersistentValuePrivate to the chain of persistent objects. Otherwise the string stored in the JSValue can get garbage collected. Change-Id: I159fd77a7ae6f29e4121969cac962bd12b0f9bc7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't allow for a QJSValue to be taken from one engine to another through ↵Simon Hausmann2013-06-131-0/+4
| | | | | | | QVariant Change-Id: I21127d22f595b0ff88f6073bddf617423ad17867 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix a few more QJSValue autotestsLars Knoll2013-06-071-0/+8
| | | | | Change-Id: Ie870da8f6b8f9e34221bbfd10f328df1dc363294 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Give the QJSValuePrivate the pointer to the engine backLars Knoll2013-05-171-4/+12
| | | | | | | | Unfortunately the value needs a pointer back to the engine, to keep compatibility with the old code and have our tests pass unmodified. Change-Id: Ibe26e6c770bd8d26dad4a26d42b40e3e1af4996c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Make the default constructor of PersistentValue not allocate a d pointerLars Knoll2013-05-071-1/+1
| | | | | | | | This is also required to change the v8::Persistent in QQmlData over to v4. Change-Id: Ib3164ded9c772e977f6b43ef6163a3aa74da3800 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rename Value::deletedValue() to Value::emptyValue()Lars Knoll2013-05-071-1/+1
| | | | | | | This reflects a bit better how this special value is being used. Change-Id: I136c8ab648bf82102fb2627e17c574a980c4d5ff Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move the internalClass pointer from Object to ManagedLars Knoll2013-05-061-17/+12
| | | | | | | | | | | | This allows us to get back the ExecutionEngine for all memeory managed objects, so we can avoid lots of special handling for String objects. Simplify and cleanup QV4::PersistentValue and make use of the available engine pointer in Managed. Change-Id: Ia2e08b6207f7e706c23be219d5f6e74b414035a3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move more methods on QV8Engine over to use v4 based syntaxLars Knoll2013-04-291-1/+4
| | | | | Change-Id: I7d3501a2c4cd0d749c7c30b5c60fee12cde58aa4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rename QQmlJS::VM namespace to QV4Lars Knoll2013-04-191-11/+11
| | | | | | | Simplifies writing code against it (less stuff to type). Change-Id: I8ac03ca2519375a204a3245e82c4be4cf1e793eb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Implement most of QJSEngine against V4Lars Knoll2013-04-191-0/+8
| | | | | | | | Also do various fixes in other places, so more of the QJS* autotests pass Change-Id: I39662a2ca1441f778595d260860375c5c628bf8e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup lots of V8 dependencies in QJS* classesLars Knoll2013-04-181-144/+31
| | | | | | | | | | | Implement a good part of QJSValue using V4. Keep the QV8Engine for now (as it is used everywhere), but add an ExecutionEngine pointer to it so other parts can more easily be ported to V4. Remove a lot of other stuff that's not required anymore. Change-Id: Ibe2c9ab10f0ee977e0e3d05a42f526206d7b22b5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add internal API for accessing V8 handles of QJS typesKent Hansen2012-05-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to use the V8 API directly. This might be necessary in cases where the QJS API is missing some functionality (e.g., controlling the V8 profiler), or for performance reasons (e.g., avoiding overhead of QJSValue indirection). The V8 API is clearly more extensive than the QJS API, and QJS will likely never reach feature parity with it (since that's outside the scope of QJS). By providing access to the underlying V8 types, users can still choose to use V8 directly in the (hopefully rare) cases where the public QJS API isn't sufficient. Two new functions are introduced: - qt_QJSEngineV8Context(QJSEngine *) returns a local handle to the engine's internal V8 context. - qt_QJSValueV8Value(const QJSValue &) returns a local handle to the QJSValue's internal V8 value. The caller is responsible for - ensuring that a V8 handle scope is in place; - entering/exiting the QJSEngine's V8 context. The documentation and tests show how that can be done. Also added a benchmark for QJSValue that can be used to measure the effect of using raw V8 API for some common operations. Change-Id: I680aeb2f67ffe5eeadd432a05c8084e43921a118 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove QJS exception APIKent Hansen2012-05-031-1/+0
| | | | | | | | | | | | | | | | | This API has been deprecated for a while. It's legacy stuff from QtScript. Until someone proves that QJSValue::isError() isn't sufficient to handle JavaScript exceptions, we won't provide any additional API for that. Also removed QJSValuePrivate::lessThan(), which was using the exception mechanism, but the function itself wasn't used anymore (another remnant from the QtScript days). Change-Id: I3dffc6a7835874153f90d25ae2a72c93ea6db39a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Silence warning about non-standard comma at the end of enumThiago Macieira2012-04-041-1/+1
| | | | | Change-Id: Iea14d05d3ce209d83ddf01a01ff94e17c6f11d86 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-10/+28
| | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+195
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>