diff options
author | Michal Klocek <michal.klocek@qt.io> | 2020-09-12 17:21:10 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2020-12-11 20:50:24 +0100 |
commit | f6c4b79a31056aa83175b9ea073088063277ff6d (patch) | |
tree | 0dd3938cc8f0f4003f50f0407448840ca5345c04 /src/core/user_script.cpp | |
parent | 136b3b67eedd5b0a555a0fdba21b2c3598d6cf66 (diff) |
Migrate user script IPC to mojo
Use mojo instead of old IPC, keep current design and use two
interfaces one global and one per frame for now, also use
in both cases associated interface with ipc channel otherwise
script can be added during the page load, which will radomly
brake tests.
This change moves UserDataScript to chromium since mojo binding
generation did not work correctly. Use StructTraits when serializing
the class.
Change-Id: I7073fb831c96849e47864382188300db3c9137d9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/user_script.cpp')
-rw-r--r-- | src/core/user_script.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/user_script.cpp b/src/core/user_script.cpp index 912b204b7..3f6721eca 100644 --- a/src/core/user_script.cpp +++ b/src/core/user_script.cpp @@ -37,7 +37,7 @@ ** ****************************************************************************/ -#include "common/user_script_data.h" +#include "qtwebengine/userscript/user_script_data.h" #include "user_script.h" #include "type_conversion.h" @@ -178,8 +178,11 @@ bool UserScript::operator==(const UserScript &other) const void UserScript::initData() { - if (scriptData.isNull()) + static uint64_t idCount = 0; + if (scriptData.isNull()) { scriptData.reset(new UserScriptData); + scriptData->scriptId = idCount++; + } } bool UserScript::isNull() const |