title: In what Javascript engines does Function.prototype.toString not return the source code of that function?
body: <p><em>EDIT: To be explicit, I am not looking for advice or opinions on the qualitative merit of the various issues implied by the functionality in question — neither am I looking for a reliable solution to a practical problem; I am simply looking for technical, verifiable answers to the question in the title. I have appended the question with a list of non-conforming browsers.</em></p>
  <p>Using a function's <code>.toString</code> method will typically <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString" rel="noreferrer">render the source code for that function</a>. The problem is that this behaviour <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-9.8" rel="noreferrer">isn't specified</a> — the spec refrains from making any commitment as to what the behaviour should be when applied to functions. Chrome's console will even tell you (when you pass anything other than a function to <code>Function.toString.call</code>), that <em>Function.prototype.toString is not generic</em></p>
  <p><a href="http://tomasz.janczuk.org/2013/05/multi-line-strings-in-javascript-and.html" rel="noreferrer">This blog post</a> suggests this can be used as a method to produce a readable syntax for multi-line strings (by storing the string as a multi-line comment in the body of <a href="http://en.wikipedia.org/wiki/NOP" rel="noreferrer">a no-op function</a>). The author suggests this usage in the context of writing <a href="http://nodejs.org/" rel="noreferrer">Node.js</a> applications with the clause that this behaviour is only reliable because Node.js runs in a controlled environment. But in Javascript's native web, anything can come along and interpret it, and we shouldn't rely on unspecified behaviour.</p>
  <p>In practice though, <a href="http://jsfiddle.net/barney/WPPYf/" rel="noreferrer">I've set up a fiddle</a> which renders a select box whose contents are determined by a large multi-line string to test the code, and every browser on my workstation (Chrome 27, Firefox 21, Opera 12, Safari 5, Internet Explorer 8) executes as intended.</p>
  <h3>What current Javascript engines <em>don't</em> behave as follows?</h3>
  <p>Given that:</p>
  <pre><code>function uncomment(fn){
    return fn.toString().split(/\/\*\n|\n\*\//g).slice(1,-1).join();
  }
  </code></pre>
  <p>The following:</p>
  <pre><code>uncomment(function(){/*
  erg
  arg
  */});
  </code></pre>
  <p>Should output:</p>
  <pre><code>erg
  arg
  </code></pre>
  <h3>List of non-conforming browsers:</h3>
  <ul>
  <li>Firefox 16</li>
  <li>…</li>
  </ul>