Changeset 244569 in webkit


Ignore:
Timestamp:
Apr 23, 2019 3:30:06 PM (5 years ago)
Author:
Devin Rousso
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.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244567 r244569  
     12019-04-23  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Debugger: remove ASSERT_NOT_REACHED where it's possible to reach
     4        https://bugs.webkit.org/show_bug.cgi?id=197210
     5        <rdar://problem/48462912>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * inspector/agents/page/PageDebuggerAgent.cpp:
     10        (WebCore::PageDebuggerAgent::didAddEventListener):
     11        (WebCore::PageDebuggerAgent::didPostMessage):
     12
     13        * inspector/InspectorInstrumentation.cpp:
     14        (WebCore::InspectorInstrumentation::consoleAgentEnabled):
     15        (WebCore::InspectorInstrumentation::timelineAgentEnabled):
     16        Drive-by: add additional `FAST_RETURN_IF_NO_FRONTENDS`.
     17
    1182019-04-23  Commit Queue  <commit-queue@webkit.org>
    219
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r244269 r244569  
    10921092bool InspectorInstrumentation::consoleAgentEnabled(ScriptExecutionContext* scriptExecutionContext)
    10931093{
    1094     InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext);
    1095     InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAgents->webConsoleAgent() : nullptr;
    1096     return consoleAgent && consoleAgent->enabled();
     1094    FAST_RETURN_IF_NO_FRONTENDS(false);
     1095    if (auto* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext)) {
     1096        if (auto* webConsoleAgent = instrumentingAgents->webConsoleAgent())
     1097            return webConsoleAgent->enabled();
     1098    }
     1099    return false;
    10971100}
    10981101
    10991102bool InspectorInstrumentation::timelineAgentEnabled(ScriptExecutionContext* scriptExecutionContext)
    11001103{
    1101     InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext);
    1102     return instrumentingAgents && instrumentingAgents->inspectorTimelineAgent();
     1104    FAST_RETURN_IF_NO_FRONTENDS(false);
     1105    if (auto* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext))
     1106        return instrumentingAgents->inspectorTimelineAgent();
     1107    return false;
    11031108}
    11041109
  • trunk/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp

    r243303 r244569  
    170170
    171171    auto& registeredListener = eventListeners.at(position);
    172     if (m_registeredEventListeners.contains(registeredListener.get())) {
    173         ASSERT_NOT_REACHED();
    174         return;
    175     }
     172    if (m_registeredEventListeners.contains(registeredListener.get()))
     173        return;
    176174
    177175    JSC::ExecState* scriptState = target.scriptExecutionContext()->execState();
     
    235233        return;
    236234
    237     if (m_postMessageTimers.contains(&timer)) {
    238         ASSERT_NOT_REACHED();
    239         return;
    240     }
     235    if (m_postMessageTimers.contains(&timer))
     236        return;
    241237
    242238    int postMessageIdentifier = m_nextPostMessageIdentifier++;
Note: See TracChangeset for help on using the changeset viewer.