Index: test/mjsunit/regress/regress-2686.js |
diff --git a/src/builtins-decls.h b/test/mjsunit/regress/regress-2686.js |
similarity index 85% |
copy from src/builtins-decls.h |
copy to test/mjsunit/regress/regress-2686.js |
index beb5dd1e80cce803e9b16a256d5d9f53323d6146..bd6106f9ca61e42becb5de05a64c7416e9919128 100644 |
--- a/src/builtins-decls.h |
+++ b/test/mjsunit/regress/regress-2686.js |
@@ -25,16 +25,8 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-#ifndef V8_BUILTINS_DECLS_H_ |
-#define V8_BUILTINS_DECLS_H_ |
+// Check Function doesn't use String.prototype.indexOf. |
-#include "arguments.h" |
- |
-namespace v8 { |
-namespace internal { |
- |
-DECLARE_RUNTIME_FUNCTION(MaybeObject*, ArrayConstructor_StubFailure); |
- |
-} } // namespace v8::internal |
- |
-#endif // V8_BUILTINS_DECLS_H_ |
+assertThrows(function() { Function('){ function foo(', '}') }, SyntaxError); |
+String.prototype.indexOf = function () { return -1; } |
+assertThrows(function() { Function('){ function foo(', '}') }, SyntaxError); |