| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Mark the global heades as insignificant, they don't contain any logic.
- Mark qv4serialize as critical: String data that might get passed to a
worker script might come from an untrusted context, and thus the
serialization process needs some basic care.
- Evertything else gets the default significant marker to indicate that
it has been reviewed.
Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-136209
Change-Id: Ib820d551f687cbd41f0306d39552e55e8642a2b3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
| |
Fixes: QTBUG-19407
Change-Id: I482689396db82332e50c41e6404d58376f4dc118
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
... rather than QQmlEngine. This paves the way for having the type
loader attached to ExecutionEngine rather than QQmlEngine.
Also, reference the execution engine in the type loader, in turn.
Task-number: QTBUG-19407
Change-Id: I04e571c5c6ac5bce5e82537cb96c6940c7186f3a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
If we leave the QQuickWorkerScript pointer around, we can process
another message on the worker thread afterwards which would still create
the worker script engine for the now-dead QQuickWorkerScript. This
crashes.
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I731ed8f53dffee33dcff73851876944c55a4ce6c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
We only need one enumeration, and all the methods of the different
events can be inline. Then we can switch over the values of the one
enum.
Change-Id: I7691fb95fca57b6930de84fa71fc7e778edd879c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Dmitrii Akshintsev <dmitrii.akshintsev@qt.io>
|
| |
|
|
|
|
|
| |
Nobody is using it and it's a thread safety risk.
Change-Id: Ifdf79cfbcb50542036509c9301917077c45a303f
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
We need to lock whenever we handle the map of workers or their owners.
We don't need to lock for merely posting events.
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ie4b499a5356665175e548917b6be2ee0bdc03ebe
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
It's used from both, the type loader and the engine thread, and also
from worker scripts. Add a comment to explain why it needs a separate
mutex.
Task-number: QTBUG-131721
Change-Id: I12ec2fe462349b3ad5f34262d3f43dfa78f0487f
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQmlTypeLoader::injectedScript() was unsafe and impossible to fix
because it had to query the engine from the type loader thread in order
to find out whether to load a script from an actual file.
By removing the whole special-casing of native modules, we can make the
script loading thread safe. A native module is now also a compilation
unit, with a regular QV4::Module as value. This means we can remove a
lot of code that deals with the native modules in the engine.
The downside is that native modules are now a lot larger than before.
However, given that they don't appear in any examples and hardly any
bugs have been filed about native modules since their introduction, we
can assume that they are not a very popular feature. The reduction in
complexity and the removal of the native modules map in the engine is
expected to outweigh the extra memory overhead for native modules.
Task-number: QTBUG-131721
Pick-to: 6.8
Change-Id: Ia7388d7ba8d71637559a791d874257fba4646330
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Since the implementation of the `\nativetype`-command in QDoc,
the `\instantiates`-command is deprecated. Replace the use of the
deprecated command in favor of its replacement.
Pick-to: 6.8
Task-number: QTBUG-128216
Change-Id: I23d9f66d3f6db2e5f827d7868497a432bb9b0626
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
| |
|
|
|
|
|
|
| |
Use QHash/QMap's constFind() instead of non-const find() where
applicable to avoid unnecessary detaches.
Change-Id: I6b31af1d163d11deb229681ff7e2f6c9f8335d8c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
| |
This way qmltyperegistrar can recognize it and refrain from warning
about it.
Task-number: QTBUG-101143
Change-Id: I598140e7e90dbd3e27a78c26eff3d46f0fd3e989
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want floating unlinked executable CUs. They should always be
tied to an engine, and the engine should not change. This gives us one
definite point where to register them with the engine (to be done in
subsequent change).
Unfortunately, due to the refcounting, we need to remove the engine from
any still-referenced CUs when the engine itself is destructed. We will
be able to drop the refcounting and make the engine fully own its
executable CUs once we can hold base CUs in most places.
Change-Id: I9a53e83d5c4746c2b2bca896b51baa4fe7fee757
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The threading example used a LauncherList to combine
two different but related examples into one.
I've now separated both into a shared directory called
'threading'
Pick-to: 6.6
Change-Id: Iee8898e61adcf69dc67157a1eff5f6ac019a39ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Creating an engine is rather expensive and as long as your script
doesn't run, we don't need one. Furthermore, this allows us to create
the engine in the same thread it will run in. Not only is this
stylistically better, but it will also let the engine check its stack
limits correctly on creation (once we do check stack limits).
Task-number: QTBUG-108182
Task-number: QTBUG-106875
Change-Id: Id0003b333c576b3bb603d8b71a5070211c7475bf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
| |
So far, you could only use them from pure JavaScript programs. Also, fix
re-exporting parts of native modules.
Fixes: QTBUG-105901
Change-Id: I170017083284e6457b1aa0c6e606fd26227edae3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We either have pre-populated arguments and thisObject, then we can just
use them and keep them const. Or, we want to allocate and populate the
arguments and the thisObject. Then, do allocate them in a separate
object, and transform that into JSCallData afterwards if necessary.
Furthermore, avoid alloc(0) as that just returns the current stack top.
Writing to it will clobber other data. Rather, just use nullptr and
crash if it's written to.
Also, remove the useless operator-> from JSCallData. That one just
confuses the reader.
Change-Id: I8310911fcfe005b05a07b78fcb3791d991a0c2ce
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't know in advance if a URL is part of the source code and should
be relative to the current element, or if it is part of the application
data and should not be touched.
[ChangeLog][QtQml][Important Behavior Changes] URLs are not resolved or
intercepted anymore when assigning them to a "url" property. Instead
they are resolved and possibly intercepted when used to access an actual
resource.
Fixes: QTBUG-76879
Change-Id: Iaa2385aff2c13aa71a12e57385d9afb5dc60a073
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
This is a much better fit conceptually, and it avoids inheriting from
ExecutionEngine.
Coverity-Id: 218787
Pick-to: 5.15
Change-Id: I3c1f1249e5267a180c46269829d9f0aa910ecdd0
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Being careful, we can now save primitive values inline. We use the heap
pointer of QV4::Value as either QString* or QV4::Value* for complex
types. We cannot store persistent managed QV4::Value without the double
indirection as those need to be allocated in a special place.
The generic QVariant case is not supported anymore. The only place where
it was actually needed were the stream operators for QJSValue. Those
were fundamentally broken:
* A managed QJSValue saved and loaded from a stream was converted to a
QVariant-type QJSValue
* QVariant-type QJSValues were not callable, could not be objects or
arrays, or any of the special types.
* Cyclic references were forcibly broken when saving to a data stream.
In general the support for saving and loading of managed types to/from
a data stream was so abysmally bad that we don't lose much by dropping
it.
[ChangeLog][QML][Important Behavior Changes] When saving a QJSValue to a
QDataStream only primitive values or strings will be retained. Support
for objects and arrays was incomplete and unreliable already before. It
cannot work correctly as we don't necessarily have a JavaScript heap
when loading a QJSValue from a stream. Therefore, we don't have a proper
place to keep any managed values. Using QVariant to keep them instead is
a bad idea because QVariant cannot represent everything a QJSValue can
contain.
Fixes: QTBUG-75174
Change-Id: I75697670639bca8d4b1668763d7020c4cf871bda
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
| |
QDoc will generate these notes automatically.
Task-number: QTBUG-37355
Change-Id: I8ed058ecbbcc630ad0351f6ce167c3fa61936f6f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qmlmodels/qqmltableinstancemodel.cpp
src/qmlmodels/qqmltableinstancemodel_p.h
Change-Id: I89339b1cb41ba27fe30c79530859a1c2bfbecc69
|
| | |
| |
| |
| |
| |
| | |
Fixes: QTBUG-82418
Change-Id: Ibceeefed75941d963e6b79b44e9231d0d8053221
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| |
| |
| |
| | |
Change-Id: I6064b5339936fce22c3fc42fc4a6af72312e5415
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |\|
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/particles/qquickitemparticle.cpp
src/qmlmodels/qqmladaptormodel.cpp
tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp
Change-Id: Ibd8fbb91da6893a09f4ffe61ad0b95d8149bbc87
|
| | |
| |
| |
| |
| |
| |
| | |
Turns out, we actually do not need to capture anything
Change-Id: I6194b45a1e8053be079d25a6d81212fa226fd3ea
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In XMLHttpRequest, we need to get the QNetworkAccessManager from the
engine. However, if the request originates from a WorkerScript, there
exists no qmlEngine. We therefore add a new indirection to access the
QNAM, and set it up accordinly in registerWorkerScript.
Fixes: QTBUG-81055
Change-Id: I8915202b6d6b7139c8386304b3d1d7a22a82045e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |/
|
|
|
|
|
|
|
|
|
| |
Previously it was impossible to determine whether a WorkerScript has
been fully initialized. This commit introduces a ready property that
allows outside Components to determine whether it is safe to send
signals.
Fixes: QTBUG-80413
Change-Id: I2a1892b5e759e317de791e71d79fbb0cbd320dd3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
QQuickWorkerScriptEnginePrivate lives in the worker thread. Therefore,
once the thread has finished there is no way to send it a deferred
delete event. The object and all its children would always leak. As
there is no event loop running in the worker thread anymore and this is
the dtor of QQuickWorkerScript, it's safe to assume that no one can
access the private object anymore afterwards.
Change-Id: I51f583ea47060d967403639196247882ff7d2905
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
|
|
|
|
|
| |
It was lost when moving the classes and the import URI was wrong.
Change-Id: Ic01f5c327ac53e58874f54399dc0434a23bed7b8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
|
|
|
| |
Change-Id: I59f738402d51e39188bbbca2ef1fbc8a61612372
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
Change-Id: I778cfe842ddf1c600a837d8f2061a338887eed95
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|