Bug 135511

Summary: REGRESSION (r169357): Disabling "allow plug-ins" doesn't stick on quit/relaunch
Product: WebKit Reporter: mitz
Component: WebKit2Assignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bunhere, cdumez, commit-queue, gyuyoung.kim, sergio
Priority: P1 Keywords: InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Respect user defaults when overrides are registered ap: review+

Description mitz 2014-08-01 10:12:29 PDT
<rdar://problem/17862013>

When opening Safari, the Allow Plug-ins option in preferences is enabled, even if it has been previously disabled.

This was caused by <http://trac.webkit.org/r169357>.
Comment 1 mitz 2014-08-01 10:19:37 PDT
Created attachment 235892 [details]
Respect user defaults when overrides are registered
Comment 2 Alexey Proskuryakov 2014-08-01 11:09:39 PDT
Comment on attachment 235892 [details]
Respect user defaults when overrides are registered

View in context: https://bugs.webkit.org/attachment.cgi?id=235892&action=review

Nice.

> Source/WebKit2/UIProcess/mac/WebPreferencesMac.mm:62
> +    if (!m_identifier)
> +        return false;

I don't understand this addition, didn't we use to assert in makeKey? Why does this need to be a runtime check?
Comment 3 mitz 2014-08-01 11:21:37 PDT
Comment on attachment 235892 [details]
Respect user defaults when overrides are registered

View in context: https://bugs.webkit.org/attachment.cgi?id=235892&action=review

>> Source/WebKit2/UIProcess/mac/WebPreferencesMac.mm:62
>> +        return false;
> 
> I don't understand this addition, didn't we use to assert in makeKey? Why does this need to be a runtime check?

registerDefaultBoolValueForKey calls platformGetBoolUserValueForKey even if the identifier is empty. I guess I could have added the checks there, but it seems logical to handle the no-identifier (and therefore no user defaults) case here.
Comment 4 mitz 2014-08-01 11:23:09 PDT
Fixed in <http://trac.webkit.org/r171928>.