From f6c4b79a31056aa83175b9ea073088063277ff6d Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Sat, 12 Sep 2020 17:21:10 +0200 Subject: 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 --- src/core/user_script.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core/user_script.cpp') 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 -- cgit v1.2.3