Bug 141343 - REGRESSION(r179705): 2nd-level inspector availability no longer controlled by DeveloperExtrasEnabled user default
Summary: REGRESSION(r179705): 2nd-level inspector availability no longer controlled by...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.10
: P2 Normal
Assignee: Brian Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-02-06 15:38 PST by Brian Burg
Modified: 2015-02-09 08:37 PST (History)
10 users (show)

See Also:


Attachments
Patch (3.21 KB, patch)
2015-02-07 21:03 PST, Brian Burg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2015-02-06 15:38:34 PST
There might be a mismatch in prefix keys between two WebPreferences instances.

Instance (1) is made by lazy initialization of WKWebViewConfiguration's WebPreferences, using prefix of "WebKit" (WKPreferences:init)
Instance (2) is made by the inspector WKWebView's WebPageGroup, using prefix of ".WebKit2" (WebPageGroup::WebPageGroup).

Both instances appear to read from NSUserDefaults. We manually set DeveloperExtrasEnabled on instance (1) before calling WKWebView:initWithFrame and that has the intended effect, so this instance is probably the one to worry about.
When stepping through WebPreferences::platformInitialize(), it seems that the if (!m_identifier) test fails, so only the debug preferences (enumerated by FOR_EACH_WEBKIT_DEBUG_PREFERENCE) are populated from user defaults.
Comment 1 Radar WebKit Bug Importer 2015-02-06 15:38:50 PST
<rdar://problem/19751830>
Comment 2 Brian Burg 2015-02-07 21:03:51 PST
Created attachment 246233 [details]
Patch
Comment 3 Brian Burg 2015-02-09 07:57:13 PST
Updated instructions at <https://trac.webkit.org/wiki/HackingWebInspector> to reflect new keys. However, we probably need to move the LogsPageMessagesToSystemConsoleEnabled key to the DEBUG group as well.
Comment 4 WebKit Commit Bot 2015-02-09 08:37:44 PST
Comment on attachment 246233 [details]
Patch

Clearing flags on attachment: 246233

Committed r179828: <http://trac.webkit.org/changeset/179828>
Comment 5 WebKit Commit Bot 2015-02-09 08:37:50 PST
All reviewed patches have been landed.  Closing bug.