Bug 137114 - Wrong CacheModel at iOS Version
Summary: Wrong CacheModel at iOS Version
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-25 02:43 PDT by Jin
Modified: 2014-09-26 22:48 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jin 2014-09-25 02:43:23 PDT
at iOS , WebPreferences store at NSUserDefault, and load when it invloke - (instancetype)initWithIdentifier:(NSString *)anIdentifier sendChangeNotification:(BOOL)sendChangeNotification 。

However,I got found a bug .

I store "WebKitCacheModelPreferenceKey" for value "2" to NSUserDefault and restart my Application.

then call the following code:

WebCacheModel settingMode = [[WebPreferences standardPreferences] cacheModel];
WebCacheModel webViewMode =[WebView _cacheModel];

assert(settingMode  == webViewMode);// not the same value.  settingMode  is "2" ,but  webViewMode  is "0".



I think the problem maybe at "+ (WebPreferences *)standardPreferences".

It sholud  change the following code:

_standardPreferences = [[WebPreferences alloc] initWithIdentifier:nil sendChangeNotification:NO];

to

_standardPreferences = [[WebPreferences alloc] initWithIdentifier:nil sendChangeNotification:YES];