зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1348215. Fix the SIMPLE_WORKER_PREF setup to not mishandle pref names that start with the worker pref name. r=ehsan
Without this change, we will call WorkerPrefChanged if a pref whose name just _starts_ with the name of one of our WORKER_SIMPLE_PREF prefs changes. Then in WorkerPrefChanged we will get the value of the pref that changed, and store it under the key identified by the closure, thus writing the value of an incorrect pref in there. MozReview-Commit-ID: JTsvvtC5P1o
This commit is contained in:
Родитель
eda24647b8
Коммит
7d85fda7ff
|
@ -2052,12 +2052,14 @@ RuntimeService::Init()
|
|||
NS_FAILED(Preferences::RegisterCallbackAndCall( \
|
||||
WorkerPrefChanged, \
|
||||
name, \
|
||||
reinterpret_cast<void*>(WORKERPREF_##NAME))) ||
|
||||
reinterpret_cast<void*>(WORKERPREF_##NAME), \
|
||||
Preferences::ExactMatch)) ||
|
||||
#define WORKER_PREF(name, callback) \
|
||||
NS_FAILED(Preferences::RegisterCallbackAndCall( \
|
||||
callback, \
|
||||
name, \
|
||||
nullptr)) ||
|
||||
nullptr, \
|
||||
Preferences::ExactMatch)) ||
|
||||
#include "WorkerPrefs.h"
|
||||
#undef WORKER_SIMPLE_PREF
|
||||
#undef WORKER_PREF
|
||||
|
|
Загрузка…
Ссылка в новой задаче