<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 - Add property to __proto__ lead to TypeError."
href="https://bugs.webkit.org/show_bug.cgi?id=161579">161579</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Add property to __proto__ lead to TypeError.
</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>JavaScriptCore
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>gskachkov@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Some unexpected behavior during working with __proto__ property in JavaScriptCore. I did not reproduced in WebKit.
var f = function () {};
debug(f.__proto__.a); // undefined;
f.__proto__.a = 10;// TypeError: undefined is not an object
debug(f.__proto__ === Function.prototype); //true
Function.prototype.a = 10; //OK
debug(Function.prototype.a); // 10
debug(f.__proto__.a); // 10
var boo = function () {
var foo = function ();
foo.__proto__.b = 10;
return foo.__proto__.b;
};
debug(boo());
var g = function () {
f.__proto__.b = 101;
};
g();
debug(f.__proto__.b); // 10</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>