| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL
Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
|
|
|
|
|
| |
Change-Id: I9ee531c903317a0f324671d98af1f967b684915c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
creatScriptFunction -> createScriptFunction
Change-Id: Icdb9214b1ae067fa2b8693d50cdac0be9fe6d390
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've had two indepedent reports of people running into the issue of
their QML code accidentally trying to access var properties in item view
delegates that were on the path of destruction, i.e. their QQmlContext was
already marked as invalid. Any such access would cause a failing assertion
in debug builds or a crash in release builds.
This patch removes the dependency to QQmlContextData for accessing the
var properties and adds a test-case that covers this use-case.
This is a regression from Qt 5.1.x.
Task-number: QTBUG-37227
Change-Id: Icf55d5fa8c15e45974e78086e9e11b2401ea9bad
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Move to a class hierarchy that mirrors the main classes. This will
allow moving functionality over into the Ref classes, as the current
Managed classes become mainly something that holds the data. This
is required to make objects movable by the GC.
Change-Id: I4ca88ab0e5d8c88c8dc56d51937990500a33e0d9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
First step of removing the templates here and turning this
into a class hierarchy. This is required, so we can move all
member methods into the Ref classes and make objects movable
during GC.
Change-Id: Ie14af07fd3e72a7d84a528d0042189ff12ba21bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
remove trailing spaces and expand tabs
Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Encapsulate accesses to the current context, and rework
the way we push and pop this context from the context
stack.
Largely a cleanup, but simplifies the code in the long term
Change-Id: I409e378490d0ab027be6a4c01a4031b2ea35c51d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Don't use recursive function calls anymore. Instead, push marked
objects onto the JS stack, and then pop them off when their children
are being marked.
Should reduce stack memory usage, and improves performance by ~5%.
Change-Id: I2d37d97579144fcba87ec8e9fd545dd220c01fbb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This issue was discovered while running the QtQuick Controls auto-tests
in valgrind. The issue is that the QObject based property in the VME meta
object is deleted as a child, after its parent (that had the property)
was deleted. At that point it's not safe anymore to emit the notify signal
in the already-deleted object (m_target->object).
Change-Id: I54e81dfedb6e712b8cbf182a72254e33e82910e3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I2421dc48fb271b66bd476fb16a32a88fcc4c5177
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Replace all try/catch statements used when parsing
with checks for engine->hasException.
Change-Id: I4493cb600d5a3eb095c2003bb88bd031403e47c9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
QQmlError is public API and shouldn't expose an internal
method.
Change-Id: I7caf06af9340fefec5c96103395fe74acbf19497
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
...instead of extracting the function body as a string and compiling it in the
GUI thread.
Change-Id: I3c3108f6e35464b5581a2d8b5799e7285858ce4d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes the exception handling API in the engine slightly, encapsulating
any use of direct throw statements and catch blocks with concrete types. In the future
we need to be able to change the way these are implemented, in order to ensure that
the correct stack unwinding code is triggered for throw and re-throw.
This patch separates the C++ exception object thrown from the V4 exception
(that includes value, throwing context pointer) and stores the latter inside
the engine.
In order for that to compile, ExecutionEngine::StackTrace and StackFrame had to
move into the QV4 namespace directly.
In addition the syntax for catching exceptions changes from
try {
...
} catch (QV4::Exception &ex) {
ex.accept(context);
QV4::ScopedValue exceptionValue(scope, ex.value());
}
to
try {
...
} catch (...) {
QV4::ScopedValue exception(scope, context->catchException());
}
Context::catchException() checks if there's a "current" exception in the engine,
and if not assumes that we caught an unrelated exception and consequently re-throws.
partiallyUnwind() is also gone and replaced with rethrowException(), in order to
encapsulate the re-throw.
Lastly, in the future nesting try/catch blocks isn't going to be possible due to
limitations in the common C++ ABI with regards to foreign exceptions.
Change-Id: Ic81c75b057a2147e3176d8e0b4d326c14278b47d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ie463efe600d498ce77d4b9e8b48abcfd61c1ab78
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I409a8505a9e01f86d777bc694d24516d1c8f0c4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This will simplify finding the remaining direct usages of
QV4::Value that need fixing.
Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I372f1f3e3e78d45912a913f437e622e0acfc9646
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Don't use unprotected Values in the API anymore.
Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I7d02b0fdf45079d0f7afcfb6d3158dd60cb09f33
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
emptyValue is special and reserved for usage inside the
engine to mark missing values. The main to use cases
are when converting property descriptors, and to mark
holes in array data.
Change-Id: I0ed357e65102b1041bf9a878e6e9a4ae0657523b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: If294c9c4f574824c308b63a11da1337226180105
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: If8b0c3b91be50678693868c10fefc3678008834d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I0371ed21c4ef99564d3ffa1082dd109e890a78bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
The class is going to be used all over the place, so let's
give it a short name :)
Change-Id: If61543cb2c885e7fbb95c8fc4d0e870097c352ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This brings things more in line with ScopedValue, and
also simplifies cleanup of Scoped values.
Change-Id: If5f1466b4e13c629d56c1e7c638937f61ba48f77
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ief2d75e9789dd367c603d90dc0fe5316a0d055e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I22e853acfd2da337344b581bb0412c5f9930c510
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows faster pass through of the data if we have
nested calls.
Also make sure we always reserve at least
QV4::Global::ReservedArgumentCount Values on the
stack to avoid stack corruption.
Change-Id: I42976460f1ef11a333d4adda70fba8daac66acf3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
When marking the var properties of a VME-metaobject (we decided to keep its
QObject alive), then we must also mark the var properties of the parent
VME-metaobject. The two property var inheritance tests verify that.
Change-Id: If1f0d4f3daef78d42adb7052cc1ce7bbdd6da585
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
...where it is just called wrap(), because it doesn't always create a new
JS wrapper for the QObject.
Change-Id: Ieed0fc97174eb51cd04df0149e715c234a5822bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename v8object to jsWrapper in QQmlData
* Rename v8objectid to jsEngineId, as that's the identifier of the engine
that currently owns the primary JS wrapper
This is in preparation for moving newObject away from QV8QObjectWrapper
Change-Id: I6432365e849d159600e22f09e7e2ab2ae2117db6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I8726148093079b3385c6b0f16284af0b5ba92066
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: If3b45ea3048f6167a121011191aa5f42b2fe2e88
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ib0a8ba76df51276d53cf251b0ed979176e1fba01
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ie865cdf564e2562db7febbdef6b7bfa75e44859c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ie9e5e40b4bea4d4379dc9bdd103852c32d6ae478
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When destructing the JS engine and deleting the JS wrappers, we may decide
to delete the QObjects of JS owned JS QObject wrappers. During this phase
(engine destruction) we need to delete the QObject instantly instead of
deferred (the default when _running_ the engine).
* Delete the memory manager first in the ExecutionEngine destructor, as
some of the user code destructors we may end up calling still expect
a somewhat functioning engine unfortunately.
* Fixed also some bugs in Persistent/WeakValue: When assing a value,
detach properly if refcount > 0
* Fixed a bug when clearing a weak value during sweep, when we wouldn't
pick up the correct next pointer for a weak value that didn't have the mark
bit set
Change-Id: I960e58ecbb40b0ecf2bc07fe661a1ec706fcca61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
We don't do rewriting for bindings anymore.
Remove a method overload that's not really needed
anymore.
Change-Id: I9d57d30dce4848cb06c88c3f042ccf30e6d41aab
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of a GC callback, let's keep the lifecycle of the var properties and
the QObject wrapped variants in sync with the lifecycle of the JS QObject
wrapper, through a markObjects re-implementation.
handleReferenceManagement test passes now, fixed a few incorrect gc() calls
in there.
Change-Id: I78e8ca700e41bba788b61d3816a77cfb3a7c5e58
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Iee910dcc1d3148922d2f92055eb06cdb0b889502
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a proper sub-class instead of external object resources, as a first
step towards porting the QObject bindings away from V8.
This also replaces the function template / constructor approach and the
faster getter optimization with a plain virtual get in the V4::Object.
Property lookup in QObject bindings will be subject to future optimizations
that will work very differently once we enable the faster V4 lookup mechanism
in QML.
Change-Id: Ib7c2eead5323c22290c2924de786d9cfcf308c03
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Make sure to size the QVarLengthArray properly to avoid out-of-bounds
access.
Change-Id: Id075730ffa2e366a729b401b8563ad7fd59597de
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
Replacing the other half requires a replacement for v8::Script.
Change-Id: I40fe99302fba23f286773ec1adaf8d3751db901d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Implement variant support through a QV4::VariantObject
class. Port scarce resource support for the
pixmap and image variants.
Change-Id: Ib6aac8debc7f57224ccddb912ab4342c5f1dec15
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Id542914c64558c1eba30a300cb10606fa499e594
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ifdf57d6cb266a7b63fec9f1f85bda8070c44036f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This reflects a bit better how this special value is being used.
Change-Id: I136c8ab648bf82102fb2627e17c574a980c4d5ff
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|