Title: [170251] trunk/Source/WebKit2
- Revision
- 170251
- Author
- [email protected]
- Date
- 2014-06-21 13:05:38 -0700 (Sat, 21 Jun 2014)
Log Message
Only initialize WebPreferences from NSUserDefaults if there's an identifier
https://bugs.webkit.org/show_bug.cgi?id=134162
Reviewed by Sam Weinig.
We don't want to allow changing preferences by registering user defaults.
* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::makeKey):
(WebKit::WebPreferences::platformInitializeStore):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (170250 => 170251)
--- trunk/Source/WebKit2/ChangeLog 2014-06-21 19:41:31 UTC (rev 170250)
+++ trunk/Source/WebKit2/ChangeLog 2014-06-21 20:05:38 UTC (rev 170251)
@@ -1,5 +1,18 @@
2014-06-21 Anders Carlsson <[email protected]>
+ Only initialize WebPreferences from NSUserDefaults if there's an identifier
+ https://bugs.webkit.org/show_bug.cgi?id=134162
+
+ Reviewed by Sam Weinig.
+
+ We don't want to allow changing preferences by registering user defaults.
+
+ * UIProcess/mac/WebPreferencesMac.mm:
+ (WebKit::makeKey):
+ (WebKit::WebPreferences::platformInitializeStore):
+
+2014-06-21 Anders Carlsson <[email protected]>
+
Begin work on decoding the back/forward tree
https://bugs.webkit.org/show_bug.cgi?id=134161
Modified: trunk/Source/WebKit2/UIProcess/mac/WebPreferencesMac.mm (170250 => 170251)
--- trunk/Source/WebKit2/UIProcess/mac/WebPreferencesMac.mm 2014-06-21 19:41:31 UTC (rev 170250)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPreferencesMac.mm 2014-06-21 20:05:38 UTC (rev 170251)
@@ -34,15 +34,10 @@
static inline NSString* makeKey(NSString *identifier, NSString *keyPrefix, NSString *key)
{
+ ASSERT(identifier);
ASSERT(keyPrefix);
ASSERT(key);
- if (!identifier) {
- // Allow preferences that don't have a prefix to be overridden by using the keyPrefix.
- // For the legacy C SPI, this is “WebKit2.” and for the modern API it's “WebKit”.
- return [keyPrefix stringByAppendingString:key];
- }
-
return [NSString stringWithFormat:@"%@%@%@", identifier, keyPrefix, key];
}
@@ -92,6 +87,9 @@
void WebPreferences::platformInitializeStore()
{
+ if (!m_identifier)
+ return;
+
#define INITIALIZE_PREFERENCE_FROM_NSUSERDEFAULTS(KeyUpper, KeyLower, TypeName, Type, DefaultValue) \
set##TypeName##ValueIfInUserDefaults(m_identifier, m_keyPrefix, WebPreferencesKey::KeyLower##Key(), m_store);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes