<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 evaluateJavaScript:completionHandler: should reuse its JSContext instance"
href="https://bugs.webkit.org/show_bug.cgi?id=146416">146416</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>WKWebView evaluateJavaScript:completionHandler: should reuse its JSContext instance
</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>WebKit2
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mihaip@chromium.org
</td>
</tr></table>
<p>
<div>
<pre>Similar to the fix made in <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - ScriptMessageHandlerDelegate::didPostMessage() should reuse its JSContext instance"
href="show_bug.cgi?id=146358">bug 146358</a>, evaluateJavaScript:completionHandler: in WKWebView creates a new JSContext every time it parses the return value (see <a href="http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm#L640">http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm#L640</a>). This is inefficient and could benefit from the same caching added by <a href="http://trac.webkit.org/changeset/186010">http://trac.webkit.org/changeset/186010</a>
I reported this via Radar in rdar://17956460 during the iOS 8 beta period.</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>