What are the side effects of breaking the prototype chain in javascript?
<p>We write a lot of JavaScript code to run our automated testing using a tool called TestComplete.  In several cases I've set up inheritance trees using the following syntax:</p>

<pre class="lang-js prettyprint-override"><code>function Parent()
{
    ...
    //some inline code here executes on object creation
}

Child.prototype = Parent;
Child.prototype.constructor = Child;
function Child()
{
    Parent.call(this);
    ...
}
</code></pre>

<p>The reason I've used</p>

<pre><code>Child.prototype = Parent;
</code></pre>

<p>instead of</p>

<pre><code>Child.prototype = new Parent();
</code></pre>

<p>is because there is code that is executed on the creation of a new object in the parent in some cases.  Setting the prototype this way has never been an issue, in that I've always been able to call all the functions defined in the Parent after having created a Child.</p>

<p>I suspect, however, I've actually broken the prototype chain in doing this and I've been saved by the fact that all the methods we define are defined inline (ie. inside the constructor function) and not using the object.prototype.method = ... syntax, and so the fact the chain is broken has gone unnoticed.</p>

<p>So I have two questions; have I broken the chain, and what are the side effects of breaking the prototype chain in JavaScript?</p>
