RESOLVED FIXED 56643
Web Inspector: implement inspector session storage.
https://bugs.webkit.org/show_bug.cgi?id=56643
Summary Web Inspector: implement inspector session storage.
Pavel Podivilov
Reported 2011-03-18 06:28:54 PDT
Web Inspector: implement inspector session storage. We would like to enable debugger/profiler from frontend side only. However, when user clicks "Start Debugging JavaScript" in Safari, we need to enable debugger when frontend is opened or re-opened for the same page. The idea is to store debugger-enabled setting in session storage and check it on frontend load.
Attachments
Patch. (11.32 KB, patch)
2011-03-18 06:29 PDT, Pavel Podivilov
yurys: review-
Patch. (12.45 KB, patch)
2011-03-18 07:41 PDT, Pavel Podivilov
yurys: review+
Pavel Podivilov
Comment 1 2011-03-18 06:29:49 PDT
Yury Semikhatsky
Comment 2 2011-03-18 06:59:29 PDT
Comment on attachment 86160 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=86160&action=review > Source/WebCore/WebCore.exp.in:1283 > +__ZN7WebCore15InspectorClient18loadSessionSettingERKN3WTF6StringEPS2_ Mind alphabetic order. Also most of the inspector symbols are guarded by #if ENABLE(INSPECTOR) (see http://trac.webkit.org/browser/trunk/Source/WebCore/WebCore.exp.in#L1489) , you should move this couple there as well. > Source/WebCore/inspector/InspectorClient.h:59 > + void saveSessionSetting(const String& key, const String& value); InspectorClient API has nothing to do with these storage. The fact that the session storage is implemented on the inspector client is platform-specific and should be implemented in the WebKit layer. > Source/WebCore/inspector/InspectorFrontendHost.cpp:225 > + m_client->saveSessionSetting(key, value); You should check that the client has not been disconnected yet as in the other methods. > Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:207 > + InspectorClient* client = [m_windowController.get() inspectorClient]; You should use platform-specific storage here, generic interface shouldn't contain session storage methods.
Pavel Podivilov
Comment 3 2011-03-18 07:41:10 PDT
Pavel Podivilov
Comment 4 2011-03-18 07:41:18 PDT
(In reply to comment #2) > (From update of attachment 86160 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=86160&action=review > > > Source/WebCore/WebCore.exp.in:1283 > > +__ZN7WebCore15InspectorClient18loadSessionSettingERKN3WTF6StringEPS2_ > > Mind alphabetic order. Also most of the inspector symbols are guarded by #if ENABLE(INSPECTOR) (see http://trac.webkit.org/browser/trunk/Source/WebCore/WebCore.exp.in#L1489) , you should move this couple there as well. > > > Source/WebCore/inspector/InspectorClient.h:59 > > + void saveSessionSetting(const String& key, const String& value); > > InspectorClient API has nothing to do with these storage. The fact that the session storage is implemented on the inspector client is platform-specific and should be implemented in the WebKit layer. > > > Source/WebCore/inspector/InspectorFrontendHost.cpp:225 > > + m_client->saveSessionSetting(key, value); > > You should check that the client has not been disconnected yet as in the other methods. > > > Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:207 > > + InspectorClient* client = [m_windowController.get() inspectorClient]; > > You should use platform-specific storage here, generic interface shouldn't contain session storage methods. Done.
Yury Semikhatsky
Comment 5 2011-03-18 08:04:00 PDT
Comment on attachment 86163 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=86163&action=review > Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:122 > +void WebInspectorClient::saveSessionSetting(const String& key, const String& value) Consider moving these two methods to WebKit/cf
Pavel Podivilov
Comment 6 2011-03-18 08:43:40 PDT
Note You need to log in before you can comment on or make changes to this bug.