<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 - WKWebView does evaluate JavaScript after cookies have been cleared"
   href="https://bugs.webkit.org/show_bug.cgi?id=149079">149079</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>WKWebView does evaluate JavaScript after cookies have been cleared
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>iOS
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>iOS 9.0
          </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>shreyasv&#64;chromium.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=261025" name="attach_261025" title="Sample app that repros this bug">attachment 261025</a> <a href="attachment.cgi?id=261025&amp;action=edit" title="Sample app that repros this bug">[details]</a></span>
Sample app that repros this bug

WKWebView does evaluate JavaScript after cookies have been cleared.
This is problematic because the completionHandler from the -[WKWebView evaluateJavaScript:completionHandler:] is never called.

Steps to Reproduce:
1) Run the attached code
2) Click on &quot;wv1&quot;, that creates a WKWebView and loads a webpage
3) Click on &quot;clear cookies&quot;, that uses the WKWebsiteDataStore API to clear cookies
4) Click on rc, that injects JS to retrieve the cookies from a web page.

Expected Results:
The completionHandler (from the JS eval method) is called.

Actual Results:
The completionHandler (from the JS eval method) is never called.

Version:
iOS9.0</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>