<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 - Reproducible &quot;Unhanded web process message 'WebUserContentController:AddUserScripts'&quot; and friends"
   href="https://bugs.webkit.org/show_bug.cgi?id=153193">153193</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Reproducible &quot;Unhanded web process message 'WebUserContentController:AddUserScripts'&quot; and friends
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>WebKit 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>WebKit2
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>thorton&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=269188" name="attach_269188" title="API test that reproduces the problem (and asserts/crashes later too)">attachment 269188</a> <a href="attachment.cgi?id=269188&amp;action=edit" title="API test that reproduces the problem (and asserts/crashes later too)">[details]</a></span>
API test that reproduces the problem (and asserts/crashes later too)

Steps to Reproduce:

1. Apply the attached test patch and run the API test.

Notes:

The WebPageProxy constructor assumes that if the process is already running, it can add itself to the existing WebUserContentController(Proxy) and all will be well.

However, if the API client constructs a different WKUserContentController for two views, and forces them both into the same process (by setting the process cap to 1), when WebPageProxy's constructor goes to use the existing WebUserContentController, it sends a message with a WebUserContentController ID that doesn't exist yet on the WebProcess side (because createWebPage, which usually brings it up, hasn't happened yet), and we lose the message.

This also means that we'll crash and burn horribly if we later try to remove e.g. a UserScriptHandler that was lost in the lost Add messages.</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>