Commit fd699888 authored by Alberto Garcia's avatar Alberto Garcia
Browse files

New upstream version 2.21.4

parent f9eb142a
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">JavaScriptCore GLib Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for JavaScriptCore 2.21.3</p></div>
<div><p class="releaseinfo">for JavaScriptCore 2.21.4</p></div>
</div>
<hr>
</div>
......
......@@ -175,7 +175,7 @@ have included when compiling your code.</p>
<hr>
<div class="refsect2">
<a name="JSC-MICRO-VERSION:CAPS"></a><h3>JSC_MICRO_VERSION</h3>
<pre class="programlisting">#define JSC_MICRO_VERSION (3)
<pre class="programlisting">#define JSC_MICRO_VERSION (4)
</pre>
</div>
</div>
......
......@@ -57,6 +57,21 @@
<a class="link" href="WebKitScriptWorld.html#webkit-script-world-new" title="webkit_script_world_new ()">webkit_script_world_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="returnvalue">WebKitScriptWorld</span></a> *
</td>
<td class="function_name">
<a class="link" href="WebKitScriptWorld.html#webkit-script-world-new-with-name" title="webkit_script_world_new_with_name ()">webkit_script_world_new_with_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="WebKitScriptWorld.html#webkit-script-world-get-name" title="webkit_script_world_get_name ()">webkit_script_world_get_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
......@@ -122,6 +137,9 @@ webkit_script_world_new (<em class="parameter"><code><span class="type">void</sp
<p>Creates a new isolated <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="type">WebKitScriptWorld</span></a>. Scripts executed in
isolated worlds have access to the DOM but not to other variable
or functions created by the page.
The <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="type">WebKitScriptWorld</span></a> is created with a generated unique name. Use
<a class="link" href="WebKitScriptWorld.html#webkit-script-world-new-with-name" title="webkit_script_world_new_with_name ()"><code class="function">webkit_script_world_new_with_name()</code></a> if you want to create it with a
custom name.
You can get the JavaScript execution context of a <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="type">WebKitScriptWorld</span></a>
for a given <a class="link" href="WebKitFrame.html" title="WebKitFrame"><span class="type">WebKitFrame</span></a> with <a class="link" href="WebKitFrame.html#webkit-frame-get-javascript-context-for-script-world" title="webkit_frame_get_javascript_context_for_script_world ()"><code class="function">webkit_frame_get_javascript_context_for_script_world()</code></a>.</p>
<div class="refsect3">
......@@ -131,6 +149,66 @@ for a given <a class="link" href="WebKitFrame.html" title="WebKitFrame"><span cl
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="webkit-script-world-new-with-name"></a><h3>webkit_script_world_new_with_name ()</h3>
<pre class="programlisting"><a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="returnvalue">WebKitScriptWorld</span></a> *
webkit_script_world_new_with_name (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>Creates a new isolated <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="type">WebKitScriptWorld</span></a> with a name. Scripts executed in
isolated worlds have access to the DOM but not to other variable
or functions created by the page.
You can get the JavaScript execution context of a <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="type">WebKitScriptWorld</span></a>
for a given <a class="link" href="WebKitFrame.html" title="WebKitFrame"><span class="type">WebKitFrame</span></a> with <a class="link" href="WebKitFrame.html#webkit-frame-get-javascript-context-for-script-world" title="webkit_frame_get_javascript_context_for_script_world ()"><code class="function">webkit_frame_get_javascript_context_for_script_world()</code></a>.</p>
<div class="refsect3">
<a name="webkit-script-world-new-with-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>a name for the script world</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="webkit-script-world-new-with-name.returns"></a><h4>Returns</h4>
<p>a new isolated <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="type">WebKitScriptWorld</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="webkit-script-world-get-name"></a><h3>webkit_script_world_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
webkit_script_world_get_name (<em class="parameter"><code><a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="type">WebKitScriptWorld</span></a> *world</code></em>);</pre>
<p>Get the name of a <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="type">WebKitScriptWorld</span></a>.</p>
<div class="refsect3">
<a name="webkit-script-world-get-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>a <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="type">WebKitScriptWorld</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="webkit-script-world-get-name.returns"></a><h4>Returns</h4>
<p> the name of <em class="parameter"><code>world</code></em>
</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
</div>
</div>
<div class="refsect1">
<a name="WebKitScriptWorld.other_details"></a><h2>Types and Values</h2>
......
......@@ -437,6 +437,22 @@
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="WebKitWebView.html#webkit-web-view-run-javascript-in-world" title="webkit_web_view_run_javascript_in_world ()">webkit_web_view_run_javascript_in_world</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="WebKitWebView.html#WebKitJavascriptResult"><span class="returnvalue">WebKitJavascriptResult</span></a> *
</td>
<td class="function_name">
<a class="link" href="WebKitWebView.html#webkit-web-view-run-javascript-in-world-finish" title="webkit_web_view_run_javascript_in_world_finish ()">webkit_web_view_run_javascript_in_world_finish</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="WebKitWebView.html#webkit-web-view-run-javascript-from-gresource" title="webkit_web_view_run_javascript_from_gresource ()">webkit_web_view_run_javascript_from_gresource</a> <span class="c_punctuation">()</span>
</td>
</tr>
......@@ -2850,6 +2866,113 @@ or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">N
</div>
<hr>
<div class="refsect2">
<a name="webkit-web-view-run-javascript-in-world"></a><h3>webkit_web_view_run_javascript_in_world ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
webkit_web_view_run_javascript_in_world
(<em class="parameter"><code><a class="link" href="WebKitWebView.html" title="WebKitWebView"><span class="type">WebKitWebView</span></a> *web_view</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *script</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *world_name</code></em>,
<em class="parameter"><code><a href="../gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../gio/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Asynchronously run <em class="parameter"><code>script</code></em>
in the script world with name <em class="parameter"><code>world_name</code></em>
of the current page context in <em class="parameter"><code>web_view</code></em>
.
If WebKitSettings:enable-javascript is FALSE, this method will do nothing.</p>
<p>When the operation is finished, <em class="parameter"><code>callback</code></em>
will be called. You can then call
<a class="link" href="WebKitWebView.html#webkit-web-view-run-javascript-in-world-finish" title="webkit_web_view_run_javascript_in_world_finish ()"><code class="function">webkit_web_view_run_javascript_in_world_finish()</code></a> to get the result of the operation.</p>
<div class="refsect3">
<a name="webkit-web-view-run-javascript-in-world.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>web_view</p></td>
<td class="parameter_description"><p>a <a class="link" href="WebKitWebView.html" title="WebKitWebView"><span class="type">WebKitWebView</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>script</p></td>
<td class="parameter_description"><p>the script to run</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>world_name</p></td>
<td class="parameter_description"><p>the name of a <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld"><span class="type">WebKitScriptWorld</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>a <a href="../gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>a <a href="../gio/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> to call when the script finished. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the data to pass to callback function. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="webkit-web-view-run-javascript-in-world-finish"></a><h3>webkit_web_view_run_javascript_in_world_finish ()</h3>
<pre class="programlisting"><a class="link" href="WebKitWebView.html#WebKitJavascriptResult"><span class="returnvalue">WebKitJavascriptResult</span></a> *
webkit_web_view_run_javascript_in_world_finish
(<em class="parameter"><code><a class="link" href="WebKitWebView.html" title="WebKitWebView"><span class="type">WebKitWebView</span></a> *web_view</code></em>,
<em class="parameter"><code><a href="../gio/GAsyncResult.html#GAsyncResult-struct"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Finish an asynchronous operation started with <a class="link" href="WebKitWebView.html#webkit-web-view-run-javascript-in-world" title="webkit_web_view_run_javascript_in_world ()"><code class="function">webkit_web_view_run_javascript_in_world()</code></a>.</p>
<div class="refsect3">
<a name="webkit-web-view-run-javascript-in-world-finish.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>web_view</p></td>
<td class="parameter_description"><p>a <a class="link" href="WebKitWebView.html" title="WebKitWebView"><span class="type">WebKitWebView</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>result</p></td>
<td class="parameter_description"><p>a <a href="../gio/GAsyncResult.html#GAsyncResult-struct"><span class="type">GAsyncResult</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for error or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="webkit-web-view-run-javascript-in-world-finish.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="WebKitWebView.html#WebKitJavascriptResult"><span class="type">WebKitJavascriptResult</span></a> with the result of the last executed statement in <em class="parameter"><code>script</code></em>
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in case of error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="webkit-web-view-run-javascript-from-gresource"></a><h3>webkit_web_view_run_javascript_from_gresource ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
webkit_web_view_run_javascript_from_gresource
......
......@@ -15,7 +15,11 @@
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"><span id="nav_index"><a class="shortcut" href="#idxF">F</a>
 <span class="dim">|</span> 
<a class="shortcut" href="#idxJ">J</a></span></td>
<a class="shortcut" href="#idxJ">J</a>
 <span class="dim">|</span> 
<a class="shortcut" href="#idxS">S</a>
 <span class="dim">|</span> 
<a class="shortcut" href="#idxW">W</a></span></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="api-index-2-20.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
......@@ -46,6 +50,24 @@
<a class="link" href="WebKitWebView.html#webkit-javascript-result-get-js-value" title="webkit_javascript_result_get_js_value ()">webkit_javascript_result_get_js_value</a>, function in <a class="link" href="WebKitWebView.html" title="WebKitWebView">WebKitWebView</a>
</dt>
<dd></dd>
<a name="idxS"></a><h3 class="title">S</h3>
<dt>
<a class="link" href="WebKitScriptWorld.html#webkit-script-world-get-name" title="webkit_script_world_get_name ()">webkit_script_world_get_name</a>, function in <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld">WebKitScriptWorld</a>
</dt>
<dd></dd>
<dt>
<a class="link" href="WebKitScriptWorld.html#webkit-script-world-new-with-name" title="webkit_script_world_new_with_name ()">webkit_script_world_new_with_name</a>, function in <a class="link" href="WebKitScriptWorld.html" title="WebKitScriptWorld">WebKitScriptWorld</a>
</dt>
<dd></dd>
<a name="idxW"></a><h3 class="title">W</h3>
<dt>
<a class="link" href="WebKitWebView.html#webkit-web-view-run-javascript-in-world" title="webkit_web_view_run_javascript_in_world ()">webkit_web_view_run_javascript_in_world</a>, function in <a class="link" href="WebKitWebView.html" title="WebKitWebView">WebKitWebView</a>
</dt>
<dd></dd>
<dt>
<a class="link" href="WebKitWebView.html#webkit-web-view-run-javascript-in-world-finish" title="webkit_web_view_run_javascript_in_world_finish ()">webkit_web_view_run_javascript_in_world_finish</a>, function in <a class="link" href="WebKitWebView.html" title="WebKitWebView">WebKitWebView</a>
</dt>
<dd></dd>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27.1</div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKit2GTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.21.3</p></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.21.4</p></div>
</div>
<hr>
</div>
......
......@@ -213,7 +213,7 @@ against at application run time.</p>
<hr>
<div class="refsect2">
<a name="WEBKIT-MICRO-VERSION:CAPS"></a><h3>WEBKIT_MICRO_VERSION</h3>
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (3)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (4)
</pre>
<p>Like <a class="link" href="webkit2gtk-4.0-WebKitVersion.html#webkit-get-micro-version" title="webkit_get_micro_version ()"><code class="function">webkit_get_micro_version()</code></a>, but from the headers used at
application compile time, rather than from the library linked
......
......@@ -177,6 +177,8 @@
<keyword type="function" name="webkit_web_view_get_javascript_global_context ()" link="WebKitWebView.html#webkit-web-view-get-javascript-global-context" deprecated="2.22: Use jsc_value_get_context() instead."/>
<keyword type="function" name="webkit_web_view_run_javascript ()" link="WebKitWebView.html#webkit-web-view-run-javascript"/>
<keyword type="function" name="webkit_web_view_run_javascript_finish ()" link="WebKitWebView.html#webkit-web-view-run-javascript-finish"/>
<keyword type="function" name="webkit_web_view_run_javascript_in_world ()" link="WebKitWebView.html#webkit-web-view-run-javascript-in-world" since="2.22"/>
<keyword type="function" name="webkit_web_view_run_javascript_in_world_finish ()" link="WebKitWebView.html#webkit-web-view-run-javascript-in-world-finish" since="2.22"/>
<keyword type="function" name="webkit_web_view_run_javascript_from_gresource ()" link="WebKitWebView.html#webkit-web-view-run-javascript-from-gresource"/>
<keyword type="function" name="webkit_web_view_run_javascript_from_gresource_finish ()" link="WebKitWebView.html#webkit-web-view-run-javascript-from-gresource-finish"/>
<keyword type="function" name="webkit_web_view_can_show_mime_type ()" link="WebKitWebView.html#webkit-web-view-can-show-mime-type"/>
......@@ -952,6 +954,8 @@
<keyword type="struct" name="struct WebKitFrame" link="WebKitFrame.html#WebKitFrame-struct"/>
<keyword type="function" name="webkit_script_world_get_default ()" link="WebKitScriptWorld.html#webkit-script-world-get-default" since="2.2"/>
<keyword type="function" name="webkit_script_world_new ()" link="WebKitScriptWorld.html#webkit-script-world-new" since="2.2"/>
<keyword type="function" name="webkit_script_world_new_with_name ()" link="WebKitScriptWorld.html#webkit-script-world-new-with-name" since="2.22"/>
<keyword type="function" name="webkit_script_world_get_name ()" link="WebKitScriptWorld.html#webkit-script-world-get-name" since="2.22"/>
<keyword type="struct" name="struct WebKitScriptWorld" link="WebKitScriptWorld.html#WebKitScriptWorld-struct"/>
<keyword type="signal" name="The “window-object-cleared” signal" link="WebKitScriptWorld.html#WebKitScriptWorld-window-object-cleared"/>
<keyword type="function" name="webkit_web_hit_test_result_get_node ()" link="WebKitWebHitTestResult.html#webkit-web-hit-test-result-get-node" since="2.8"/>
......
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKitDOMGTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.21.3</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.21.4</p></div>
</div>
<hr>
</div>
......
=================
WebKitGTK+ 2.21.4
=================
What's new in WebKitGTK+ 2.21.4?
- Switch to use a popup window with a tree view instead of a menu for option menu default implementation.
- Add API to run javascript from a WebKitWebView in an isolated world.
- Fix UI process crash in WebKitFaviconDatabase when pageURL is unset.
- Fix several crashes and rendering issues.
=================
WebKitGTK+ 2.21.3
=================
......
......@@ -83,7 +83,7 @@ inline JSC::JSValue toJS(JSC::ExecState* exec, JSValueRef v)
if (!result)
return JSC::jsNull();
if (result.isCell())
RELEASE_ASSERT(result.asCell()->methodTable());
RELEASE_ASSERT(result.asCell()->methodTable(exec->vm()));
return result;
}
......@@ -99,7 +99,7 @@ inline JSC::JSValue toJSForGC(JSC::ExecState* exec, JSValueRef v)
JSC::JSValue result = JSC::JSValue::decode(reinterpret_cast<JSC::EncodedJSValue>(const_cast<OpaqueJSValue*>(v)));
#endif
if (result && result.isCell())
RELEASE_ASSERT(result.asCell()->methodTable());
RELEASE_ASSERT(result.asCell()->methodTable(exec->vm()));
return result;
}
......
......@@ -29,7 +29,6 @@
#include "JSBase.h"
#include "JSCPoison.h"
#include "JSDestructibleObject.h"
#include "WeakReferenceHarvester.h"
#include <wtf/Poisoned.h>
#if JSC_OBJC_API_ENABLED || defined(JSC_GLIB_API_ENABLED)
......
......@@ -207,7 +207,7 @@ bool JSCallbackObject<Parent>::getOwnPropertySlot(JSObject* object, ExecState* e
template <class Parent>
bool JSCallbackObject<Parent>::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return object->methodTable()->getOwnPropertySlot(object, exec, Identifier::from(exec, propertyName), slot);
return object->methodTable(exec->vm())->getOwnPropertySlot(object, exec, Identifier::from(exec, propertyName), slot);
}
template <class Parent>
......@@ -414,7 +414,7 @@ template <class Parent>
bool JSCallbackObject<Parent>::deletePropertyByIndex(JSCell* cell, ExecState* exec, unsigned propertyName)
{
JSCallbackObject* thisObject = jsCast<JSCallbackObject*>(cell);
return thisObject->methodTable()->deleteProperty(thisObject, exec, Identifier::from(exec, propertyName));
return thisObject->methodTable(exec->vm())->deleteProperty(thisObject, exec, Identifier::from(exec, propertyName));
}
template <class Parent>
......@@ -653,7 +653,7 @@ EncodedJSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, E
if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) {
if (StaticFunctionEntry* entry = staticFunctions->get(name)) {
if (JSObjectCallAsFunctionCallback callAsFunction = entry->callAsFunction) {
JSObject* o = JSCallbackFunction::create(vm, thisObj->globalObject(), callAsFunction, name);
JSObject* o = JSCallbackFunction::create(vm, thisObj->globalObject(vm), callAsFunction, name);
thisObj->putDirect(vm, propertyName, o, entry->attributes);
return JSValue::encode(o);
}
......
......@@ -623,13 +623,16 @@ JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObject
return result;
}
bool JSObjectIsConstructor(JSContextRef, JSObjectRef object)
bool JSObjectIsConstructor(JSContextRef ctx, JSObjectRef object)
{
ExecState* exec = toJS(ctx);
VM& vm = exec->vm();
JSLockHolder locker(vm);
if (!object)
return false;
JSObject* jsObject = toJS(object);
ConstructData constructData;
return jsObject->methodTable()->getConstructData(jsObject, constructData) != ConstructType::None;
return jsObject->methodTable(vm)->getConstructData(jsObject, constructData) != ConstructType::None;
}
JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
......
......@@ -301,7 +301,7 @@ JSObjectRef JSObjectGetTypedArrayBuffer(JSContextRef ctx, JSObjectRef objectRef,
JSObject* object = toJS(objectRef);
if (JSArrayBufferView* typedArray = jsDynamicCast<JSArrayBufferView*>(vm, object))
return toRef(vm.m_typedArrayController->toJS(exec, typedArray->globalObject(), typedArray->possiblySharedBuffer()));
return toRef(vm.m_typedArrayController->toJS(exec, typedArray->globalObject(vm), typedArray->possiblySharedBuffer()));
return nullptr;
}
......
......@@ -265,7 +265,7 @@ bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObject
JSValue jsValue = toJS(exec, value);
JSObject* jsConstructor = toJS(constructor);
if (!jsConstructor->structure()->typeInfo().implementsHasInstance())
if (!jsConstructor->structure(vm)->typeInfo().implementsHasInstance())
return false;
bool result = jsConstructor->hasInstance(exec, jsValue); // false if an exception is thrown
handleExceptionIfNeeded(scope, exec, exception);
......
......@@ -31,14 +31,20 @@
@interface JSVirtualMachine(JSPrivate)
- (void)shrinkFootprint; // FIXME: Remove this SPI when clients move to shrinkFootprintWhenIdle: https://bugs.webkit.org/show_bug.cgi?id=186071
/*!
@method
@discussion Shrinks the memory footprint of the VM by deleting various internal caches,
running synchronous garbage collection, and releasing memory back to the OS. For this
to free as much memory as possible, do not call this when JavaScript is running on the stack.
running synchronous garbage collection, and releasing memory back to the OS. Note: this
API waits until no JavaScript is running on the stack before it frees any memory. It's
best to call this API when no JavaScript is running on the stack for this reason. However, if
you do call this API when JavaScript is running on the stack, the API will wait until all JavaScript
on the stack finishes running to free memory back to the OS. Therefore, calling this
API may not synchronously free memory.
*/
- (void)shrinkFootprint; // FIXME: Annotate this with NS_AVAILABLE: <rdar://problem/40071332>.
- (void)shrinkFootprintWhenIdle; // FIXME: Annotate this with NS_AVAILABLE: <rdar://problem/40071332>.
@end
......
......@@ -263,7 +263,7 @@ add_dependencies(LLIntOffsetsExtractor JavaScriptCoreForwardingHeaders)
# LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
# running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
# after every asm.rb run.
if (MSVC)
if (MSVC AND ENABLE_JIT)
set(LLIntOutput LowLevelInterpreterWin.asm)
set(OFFLINE_ASM_ARGS --assembler=MASM)
else ()
......@@ -283,7 +283,7 @@ add_custom_command(
# the .cpp files below is similar to the one in the previous comment. However, since these .cpp
# files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
# since it is used in the add_library() call at the end of this file.
if (MSVC)
if (MSVC AND ENABLE_JIT)
enable_language(ASM_MASM)
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
# Win32 needs /safeseh with assembly, but Win64 does not.
......@@ -538,7 +538,6 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS
heap/IsoSubspaceInlines.h
heap/IsoSubspacePerVM.h
heap/LargeAllocation.h
heap/ListableHandler.h
heap/LocalAllocator.h
heap/LocalAllocatorInlines.h
heap/LockDuringMarking.h
......@@ -567,7 +566,6 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS
heap/WeakHandleOwner.h
heap/WeakImpl.h
heap/WeakInlines.h
heap/WeakReferenceHarvester.h
heap/WeakSet.h
heap/WeakSetInlines.h
......
......@@ -219,6 +219,8 @@ bytecode/FunctionCodeBlock.cpp
bytecode/GetByIdStatus.cpp
bytecode/GetByIdVariant.cpp
bytecode/GetterSetterAccessCase.cpp
bytecode/InByIdStatus.cpp
bytecode/InByIdVariant.cpp
bytecode/InlineAccess.cpp
bytecode/InlineCallFrame.cpp
bytecode/InlineCallFrameSet.cpp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment