<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Non-deterministic Inspector Pause and Resume events makes tests flaky"
   href="https://bugs.webkit.org/show_bug.cgi?id=145626">145626</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Non-deterministic Inspector Pause and Resume events makes tests flaky
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Web Inspector
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mark.lam&#64;apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>graouts&#64;webkit.org, joepeck&#64;webkit.org, jonowells&#64;apple.com, mattbaker&#64;apple.com, nvasilyev&#64;apple.com, timothy&#64;apple.com, webkit-bug-importer&#64;group.apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>DebuggerManager.debuggerDidResume() defers the dispatch of the Resumed event.  DebuggerManager.debuggerDidPause() can eat that Resumed event as well as the next Paused Event if debuggerDidPause() happens to be called before debuggerDidResume()'s delayedWork() fires.  As a result, we can cannot write tests that can depend on a consistent order of Pause and Resume events.

I was advised to use the CallFramesDidChange event instead.  The problem with this is that the number of CallFramesDidChange events firing also depends on the race between debuggerDidPause() and debuggerDidResume()'s delayedWork().  For example, the regression test of <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - finally blocks should not set the exception stack trace when re-throwing the exception."
   href="show_bug.cgi?id=145525">https://bugs.webkit.org/show_bug.cgi?id=145525</a> (which is currently written to assume that some Paused and Resume events will be eaten) runs fine on WK1 using DumpRenderTree.  When we run it on WK2 using WKRT which runs a lot slower, the events don't get eaten.  As a result, the test fails.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>