Bug 137114
| Summary: | Wrong CacheModel at iOS Version | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jin <ljin.zq> |
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ap, mitz |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | iPhone / iPad | ||
| OS: | All | ||
Jin
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];
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |