Web Inspector: Remove unnecessary developerExtrasEnabled checks
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jan 2018 03:31:36 +0000 (03:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jan 2018 03:31:36 +0000 (03:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182156

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-01-25
Reviewed by Matt Baker.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
(WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl):
(WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
These checks should not be needed. The step above bails if there is
no inspector frontend, and there can be no inspector frontend unless
developer extras enabled are enabled.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227650 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorInstrumentation.cpp

index 26c6eb0..0a470df 100644 (file)
@@ -1,3 +1,18 @@
+2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove unnecessary developerExtrasEnabled checks
+        https://bugs.webkit.org/show_bug.cgi?id=182156
+
+        Reviewed by Matt Baker.
+
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
+        (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl):
+        (WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
+        These checks should not be needed. The step above bails if there is
+        no inspector frontend, and there can be no inspector frontend unless
+        developer extras enabled are enabled.
+
 2018-01-25  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Add localizable strings for extra-zoomed form controls
index c68be76..c028611 100644 (file)
@@ -573,9 +573,6 @@ void InspectorInstrumentation::willSendRequestOfTypeImpl(InstrumentingAgents& in
 
 void InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl(InstrumentingAgents& instrumentingAgents, DocumentLoader* loader, CachedResource* cachedResource)
 {
-    if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
-        return;
-    
     if (!loader || !cachedResource)
         return;
 
@@ -733,8 +730,6 @@ void InspectorInstrumentation::didCommitLoadImpl(InstrumentingAgents& instrument
 
 void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
 {
-    if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
-        return;
     if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
         domAgent->frameDocumentUpdated(frame);
 }
@@ -915,9 +910,6 @@ void InspectorInstrumentation::workerTerminatedImpl(InstrumentingAgents& instrum
 
 void InspectorInstrumentation::didCreateWebSocketImpl(InstrumentingAgents& instrumentingAgents, unsigned long identifier, const URL& requestURL)
 {
-    if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
-        return;
-
     if (InspectorNetworkAgent* networkAgent = instrumentingAgents.inspectorNetworkAgent())
         networkAgent->didCreateWebSocket(identifier, requestURL);
 }