summaryrefslogtreecommitdiffstats
path: root/src/core/user_script_controller_host.h
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-09-25 15:39:12 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-10-08 10:31:08 +0000
commita45f6fc3e1016a223a4b235cc61b033f8665c853 (patch)
tree66ee5d1d819493a8875a6638b11bdf8e44f11f86 /src/core/user_script_controller_host.h
parentf681793c6895d390fe7a5f57718e25a4fcd10ed0 (diff)
Keep order of scripts added to QWebEngineScriptCollection
Use a QList instead of a QSet to store the scripts in the collection. This avoids situations where two scripts injected depend on each other, and fail or succeed depending on the semi-random order that QSet imposes. Change-Id: I44d5d89866ff2431544cc91afb1c102d93daa5da Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/user_script_controller_host.h')
-rw-r--r--src/core/user_script_controller_host.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/user_script_controller_host.h b/src/core/user_script_controller_host.h
index 49c96b333..3884fb3b9 100644
--- a/src/core/user_script_controller_host.h
+++ b/src/core/user_script_controller_host.h
@@ -64,7 +64,7 @@ public:
bool removeUserScript(const UserScript &script, WebContentsAdapter *adapter);
void clearAllScripts(WebContentsAdapter *adapter);
void reserve(WebContentsAdapter *adapter, int count);
- const QSet<UserScript> registeredScripts(WebContentsAdapter *adapter) const;
+ const QList<UserScript> registeredScripts(WebContentsAdapter *adapter) const;
void renderProcessStartedWithHost(content::RenderProcessHost *renderer);
@@ -75,8 +75,8 @@ private:
void webContentsDestroyed(content::WebContents *);
- QSet<UserScript> m_profileWideScripts;
- typedef QHash<content::WebContents *, QSet<UserScript>> ContentsScriptsMap;
+ QList<UserScript> m_profileWideScripts;
+ typedef QHash<content::WebContents *, QList<UserScript>> ContentsScriptsMap;
ContentsScriptsMap m_perContentsScripts;
QSet<content::RenderProcessHost *> m_observedProcesses;
QScopedPointer<RenderProcessObserverHelper> m_renderProcessObserver;