Title: [244569] trunk/Source/WebCore
- Revision
- 244569
- Author
- [email protected]
- Date
- 2019-04-23 15:30:06 -0700 (Tue, 23 Apr 2019)
Log Message
Web Inspector: Debugger: remove ASSERT_NOT_REACHED where it's possible to reach
https://bugs.webkit.org/show_bug.cgi?id=197210
<rdar://problem/48462912>
Reviewed by Joseph Pecoraro.
* inspector/agents/page/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::didAddEventListener):
(WebCore::PageDebuggerAgent::didPostMessage):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::consoleAgentEnabled):
(WebCore::InspectorInstrumentation::timelineAgentEnabled):
Drive-by: add additional `FAST_RETURN_IF_NO_FRONTENDS`.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (244568 => 244569)
--- trunk/Source/WebCore/ChangeLog 2019-04-23 21:46:46 UTC (rev 244568)
+++ trunk/Source/WebCore/ChangeLog 2019-04-23 22:30:06 UTC (rev 244569)
@@ -1,3 +1,20 @@
+2019-04-23 Devin Rousso <[email protected]>
+
+ Web Inspector: Debugger: remove ASSERT_NOT_REACHED where it's possible to reach
+ https://bugs.webkit.org/show_bug.cgi?id=197210
+ <rdar://problem/48462912>
+
+ Reviewed by Joseph Pecoraro.
+
+ * inspector/agents/page/PageDebuggerAgent.cpp:
+ (WebCore::PageDebuggerAgent::didAddEventListener):
+ (WebCore::PageDebuggerAgent::didPostMessage):
+
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::consoleAgentEnabled):
+ (WebCore::InspectorInstrumentation::timelineAgentEnabled):
+ Drive-by: add additional `FAST_RETURN_IF_NO_FRONTENDS`.
+
2019-04-23 Commit Queue <[email protected]>
Unreviewed, rolling out r244556.
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (244568 => 244569)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2019-04-23 21:46:46 UTC (rev 244568)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2019-04-23 22:30:06 UTC (rev 244569)
@@ -1091,15 +1091,20 @@
bool InspectorInstrumentation::consoleAgentEnabled(ScriptExecutionContext* scriptExecutionContext)
{
- InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext);
- InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAgents->webConsoleAgent() : nullptr;
- return consoleAgent && consoleAgent->enabled();
+ FAST_RETURN_IF_NO_FRONTENDS(false);
+ if (auto* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext)) {
+ if (auto* webConsoleAgent = instrumentingAgents->webConsoleAgent())
+ return webConsoleAgent->enabled();
+ }
+ return false;
}
bool InspectorInstrumentation::timelineAgentEnabled(ScriptExecutionContext* scriptExecutionContext)
{
- InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext);
- return instrumentingAgents && instrumentingAgents->inspectorTimelineAgent();
+ FAST_RETURN_IF_NO_FRONTENDS(false);
+ if (auto* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext))
+ return instrumentingAgents->inspectorTimelineAgent();
+ return false;
}
void InspectorInstrumentation::didRequestAnimationFrameImpl(InstrumentingAgents& instrumentingAgents, int callbackId, Document& document)
Modified: trunk/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp (244568 => 244569)
--- trunk/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp 2019-04-23 21:46:46 UTC (rev 244568)
+++ trunk/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp 2019-04-23 22:30:06 UTC (rev 244569)
@@ -169,10 +169,8 @@
return;
auto& registeredListener = eventListeners.at(position);
- if (m_registeredEventListeners.contains(registeredListener.get())) {
- ASSERT_NOT_REACHED();
+ if (m_registeredEventListeners.contains(registeredListener.get()))
return;
- }
JSC::ExecState* scriptState = target.scriptExecutionContext()->execState();
if (!scriptState)
@@ -234,10 +232,8 @@
if (!breakpointsActive())
return;
- if (m_postMessageTimers.contains(&timer)) {
- ASSERT_NOT_REACHED();
+ if (m_postMessageTimers.contains(&timer))
return;
- }
int postMessageIdentifier = m_nextPostMessageIdentifier++;
m_postMessageTimers.set(&timer, postMessageIdentifier);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes