Commit a313eada authored by darin@apple.com's avatar darin@apple.com

JavaScriptCore:

        Reviewed by Oliver.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16498
          ''.constructor.toString() gives [function]

        Test: fast/js/function-names.html

        * kjs/array_object.cpp:
        (KJS::ArrayObjectImp::ArrayObjectImp): Use the class name as the constructor's function name.
        * kjs/bool_object.cpp:
        (KJS::BooleanObjectImp::BooleanObjectImp): Ditto.
        * kjs/date_object.cpp:
        (KJS::DateObjectImp::DateObjectImp): Ditto.
        * kjs/error_object.cpp:
        (KJS::ErrorPrototype::ErrorPrototype): Make the error object be an Error.
        (KJS::ErrorObjectImp::ErrorObjectImp): Use the class name as the constructor's function name.
        (KJS::NativeErrorPrototype::NativeErrorPrototype): Take const UString&.
        (KJS::NativeErrorImp::NativeErrorImp): Use the prototype's name as the constructor's function
        name.
        * kjs/error_object.h: Change ErrorPrototype to inherit from ErrorInstance. Change the
        NativeErrorImp constructor to take a NativeErrorPrototype pointer for its prototype.
        * kjs/function.h: Removed unneeded constructor for internal functions without names.
        We want to avoid those!
        * kjs/function_object.cpp:
        (KJS::functionProtoFuncToString): Removed code that writes out just [function] for functions
        that have no names. There's no reason to do that.
        (KJS::FunctionObjectImp::FunctionObjectImp): Use the class name as the constructor's
        function name.
        * kjs/internal.cpp: Removed the unused constructor.
        * kjs/number_object.cpp:
        (KJS::fractionalPartToString): Marked static for internal linkage.
        (KJS::exponentialPartToString): Ditto.
        (KJS::numberProtoFuncToPrecision): Removed an unneeded else.
        (KJS::NumberObjectImp::NumberObjectImp): Use the class name as the constructor's
        function name.
        (KJS::NumberObjectImp::getValueProperty): Tweaked formatting.
        * kjs/object_object.cpp:
        (KJS::ObjectObjectImp::ObjectObjectImp): Use "Object" for the function name.
        * kjs/regexp_object.cpp:
        (KJS::RegExpObjectImp::RegExpObjectImp): Use "RegExp" for the function name.
        * kjs/string_object.cpp:
        (KJS::StringObjectImp::StringObjectImp): Use the class name as the constructor's
        function name.

LayoutTests:

        Reviewed by Oliver.

        - test for http://bugs.webkit.org/show_bug.cgi?id=16498
          ''.constructor.toString() gives [function]

        * fast/js/function-names-expected.txt: Updated for new tests.
        * fast/js/kde/resources/function.js: Updated test to expect the format that Gecko uses
        for native code, which we now match character for character.
        * fast/js/resources/function-names.js: Added tests for the names of all the constructors.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 579d1234
2008-01-27 Darin Adler <darin@apple.com>
Reviewed by Oliver.
- fix http://bugs.webkit.org/show_bug.cgi?id=16498
''.constructor.toString() gives [function]
Test: fast/js/function-names.html
* kjs/array_object.cpp:
(KJS::ArrayObjectImp::ArrayObjectImp): Use the class name as the constructor's function name.
* kjs/bool_object.cpp:
(KJS::BooleanObjectImp::BooleanObjectImp): Ditto.
* kjs/date_object.cpp:
(KJS::DateObjectImp::DateObjectImp): Ditto.
* kjs/error_object.cpp:
(KJS::ErrorPrototype::ErrorPrototype): Make the error object be an Error.
(KJS::ErrorObjectImp::ErrorObjectImp): Use the class name as the constructor's function name.
(KJS::NativeErrorPrototype::NativeErrorPrototype): Take const UString&.
(KJS::NativeErrorImp::NativeErrorImp): Use the prototype's name as the constructor's function
name.
* kjs/error_object.h: Change ErrorPrototype to inherit from ErrorInstance. Change the
NativeErrorImp constructor to take a NativeErrorPrototype pointer for its prototype.
* kjs/function.h: Removed unneeded constructor for internal functions without names.
We want to avoid those!
* kjs/function_object.cpp:
(KJS::functionProtoFuncToString): Removed code that writes out just [function] for functions
that have no names. There's no reason to do that.
(KJS::FunctionObjectImp::FunctionObjectImp): Use the class name as the constructor's
function name.
* kjs/internal.cpp: Removed the unused constructor.
* kjs/number_object.cpp:
(KJS::fractionalPartToString): Marked static for internal linkage.
(KJS::exponentialPartToString): Ditto.
(KJS::numberProtoFuncToPrecision): Removed an unneeded else.
(KJS::NumberObjectImp::NumberObjectImp): Use the class name as the constructor's
function name.
(KJS::NumberObjectImp::getValueProperty): Tweaked formatting.
* kjs/object_object.cpp:
(KJS::ObjectObjectImp::ObjectObjectImp): Use "Object" for the function name.
* kjs/regexp_object.cpp:
(KJS::RegExpObjectImp::RegExpObjectImp): Use "RegExp" for the function name.
* kjs/string_object.cpp:
(KJS::StringObjectImp::StringObjectImp): Use the class name as the constructor's
function name.
2008-01-26 Darin Adler <darin@apple.com>
Reviewed by Oliver.
......
/*
* Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
* Copyright (C) 2003, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2003, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2003 Peter Kelly (pmk@post.com)
* Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
*
......@@ -720,10 +720,8 @@ JSValue* arrayProtoFuncLastIndexOf(ExecState* exec, JSObject* thisObj, const Lis
// ------------------------------ ArrayObjectImp -------------------------------
ArrayObjectImp::ArrayObjectImp(ExecState* exec,
FunctionPrototype* funcProto,
ArrayPrototype* arrayProto)
: InternalFunctionImp(funcProto)
ArrayObjectImp::ArrayObjectImp(ExecState* exec, FunctionPrototype* funcProto, ArrayPrototype* arrayProto)
: InternalFunctionImp(funcProto, arrayProto->classInfo()->className)
{
// ECMA 15.4.3.1 Array.prototype
put(exec, exec->propertyNames().prototype, arrayProto, DontEnum|DontDelete|ReadOnly);
......
......@@ -85,7 +85,7 @@ JSValue* booleanProtoFuncValueOf(ExecState* exec, JSObject* thisObj, const List&
BooleanObjectImp::BooleanObjectImp(ExecState* exec, FunctionPrototype* functionPrototype, BooleanPrototype* booleanPrototype)
: InternalFunctionImp(functionPrototype)
: InternalFunctionImp(functionPrototype, booleanPrototype->classInfo()->className)
{
putDirect(exec->propertyNames().prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
......
/*
* Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
* Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -439,10 +439,8 @@ bool DatePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& proper
// TODO: MakeTime (15.9.11.1) etc. ?
DateObjectImp::DateObjectImp(ExecState *exec,
FunctionPrototype *funcProto,
DatePrototype *dateProto)
: InternalFunctionImp(funcProto)
DateObjectImp::DateObjectImp(ExecState* exec, FunctionPrototype* funcProto, DatePrototype* dateProto)
: InternalFunctionImp(funcProto, dateProto->classInfo()->className)
{
static const Identifier* parsePropertyName = new Identifier("parse");
static const Identifier* UTCPropertyName = new Identifier("UTC");
......
......@@ -42,7 +42,7 @@ ErrorInstance::ErrorInstance(JSObject* prototype)
// ECMA 15.9.4
ErrorPrototype::ErrorPrototype(ExecState* exec, ObjectPrototype* objectPrototype, FunctionPrototype* functionPrototype)
: JSObject(objectPrototype)
: ErrorInstance(objectPrototype)
{
// The constructor will be added later in ErrorObjectImp's constructor
......@@ -71,12 +71,11 @@ JSValue* errorProtoFuncToString(ExecState* exec, JSObject* thisObj, const List&)
// ------------------------------ ErrorObjectImp -------------------------------
ErrorObjectImp::ErrorObjectImp(ExecState* exec, FunctionPrototype* funcProto, ErrorPrototype* errorProto)
: InternalFunctionImp(funcProto)
: InternalFunctionImp(funcProto, errorProto->classInfo()->className)
{
// ECMA 15.11.3.1 Error.prototype
putDirect(exec->propertyNames().prototype, errorProto, DontEnum|DontDelete|ReadOnly);
putDirect(exec->propertyNames().length, jsNumber(1), DontDelete|ReadOnly|DontEnum);
//putDirect(namePropertyName, jsString(n));
}
bool ErrorObjectImp::implementsConstruct() const
......@@ -106,7 +105,7 @@ JSValue* ErrorObjectImp::callAsFunction(ExecState* exec, JSObject* /*thisObj*/,
// ------------------------------ NativeErrorPrototype ----------------------
NativeErrorPrototype::NativeErrorPrototype(ExecState* exec, ErrorPrototype* errorProto, UString name, UString message)
NativeErrorPrototype::NativeErrorPrototype(ExecState* exec, ErrorPrototype* errorProto, const UString& name, const UString& message)
: JSObject(errorProto)
{
putDirect(exec->propertyNames().name, jsString(name), 0);
......@@ -117,8 +116,8 @@ NativeErrorPrototype::NativeErrorPrototype(ExecState* exec, ErrorPrototype* erro
const ClassInfo NativeErrorImp::info = { "Function", &InternalFunctionImp::info, 0 };
NativeErrorImp::NativeErrorImp(ExecState* exec, FunctionPrototype* funcProto, JSObject* prot)
: InternalFunctionImp(funcProto)
NativeErrorImp::NativeErrorImp(ExecState* exec, FunctionPrototype* funcProto, NativeErrorPrototype* prot)
: InternalFunctionImp(funcProto, Identifier(prot->getDirect(exec->propertyNames().name)->getString()))
, proto(prot)
{
putDirect(exec->propertyNames().length, jsNumber(1), DontDelete|ReadOnly|DontEnum); // ECMA 15.11.7.5
......
......@@ -33,7 +33,7 @@ namespace KJS {
static const ClassInfo info;
};
class ErrorPrototype : public JSObject {
class ErrorPrototype : public ErrorInstance {
public:
ErrorPrototype(ExecState*, ObjectPrototype*, FunctionPrototype*);
};
......@@ -52,12 +52,12 @@ namespace KJS {
class NativeErrorPrototype : public JSObject {
public:
NativeErrorPrototype(ExecState*, ErrorPrototype*, UString name, UString message);
NativeErrorPrototype(ExecState*, ErrorPrototype*, const UString& name, const UString& message);
};
class NativeErrorImp : public InternalFunctionImp {
public:
NativeErrorImp(ExecState*, FunctionPrototype*, JSObject*);
NativeErrorImp(ExecState*, FunctionPrototype*, NativeErrorPrototype*);
virtual bool implementsConstruct() const;
virtual JSObject* construct(ExecState*, const List&);
......
// -*- c-basic-offset: 2 -*-
/*
* Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
* Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca)
* Copyright (C) 2007 Maks Orlovich
*
......@@ -41,7 +41,6 @@ namespace KJS {
class InternalFunctionImp : public JSObject {
public:
InternalFunctionImp();
InternalFunctionImp(FunctionPrototype*);
InternalFunctionImp(FunctionPrototype*, const Identifier&);
virtual bool implementsCall() const;
......
// -*- c-basic-offset: 2 -*-
/*
* This file is part of the KDE libraries
* Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
* Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -78,10 +76,7 @@ JSValue* functionProtoFuncToString(ExecState* exec, JSObject* thisObj, const Lis
return jsString("function " + fi->functionName().ustring() + "(" + fi->body->paramString() + ") " + fi->body->toString());
}
if (thisObj->inherits(&InternalFunctionImp::info) && !static_cast<InternalFunctionImp*>(thisObj)->functionName().isNull())
return jsString("\nfunction " + static_cast<InternalFunctionImp*>(thisObj)->functionName().ustring() + "() {\n [native code]\n}\n");
return jsString("[function]");
return jsString("function " + static_cast<InternalFunctionImp*>(thisObj)->functionName().ustring() + "() {\n [native code]\n}");
}
JSValue* functionProtoFuncApply(ExecState* exec, JSObject* thisObj, const List& args)
......@@ -136,7 +131,7 @@ JSValue* functionProtoFuncCall(ExecState* exec, JSObject* thisObj, const List& a
// ------------------------------ FunctionObjectImp ----------------------------
FunctionObjectImp::FunctionObjectImp(ExecState* exec, FunctionPrototype* functionPrototype)
: InternalFunctionImp(functionPrototype)
: InternalFunctionImp(functionPrototype, functionPrototype->classInfo()->className)
{
putDirect(exec->propertyNames().prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);
......
/*
* Copyright (C) 1999-2002 Harri Porten (porten@kde.org)
* Copyright (C) 2001 Peter Kelly (pmk@post.com)
* Copyright (C) 2004, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2004, 2007, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -226,11 +226,6 @@ InternalFunctionImp::InternalFunctionImp()
{
}
InternalFunctionImp::InternalFunctionImp(FunctionPrototype* funcProto)
: JSObject(funcProto)
{
}
InternalFunctionImp::InternalFunctionImp(FunctionPrototype* funcProto, const Identifier& name)
: JSObject(funcProto)
, m_name(name)
......
// -*- c-basic-offset: 2 -*-
/*
* Copyright (C) 1999-2000,2003 Harri Porten (porten@kde.org)
* Copyright (C) 2007 Apple Inc. All rights reserved.
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -274,7 +273,7 @@ JSValue* numberProtoFuncToFixed(ExecState* exec, JSObject* thisObj, const List&
return jsString(s + m.substr(0, kMinusf));
}
void fractionalPartToString(char* buf, int& i, const char* result, int resultLength, int fractionalDigits)
static void fractionalPartToString(char* buf, int& i, const char* result, int resultLength, int fractionalDigits)
{
if (fractionalDigits <= 0)
return;
......@@ -295,7 +294,7 @@ void fractionalPartToString(char* buf, int& i, const char* result, int resultLen
buf[i++] = '0';
}
void exponentialPartToString(char* buf, int& i, int decimalPoint)
static void exponentialPartToString(char* buf, int& i, int decimalPoint)
{
buf[i++] = 'e';
buf[i++] = (decimalPoint >= 0) ? '+' : '-';
......@@ -441,7 +440,7 @@ JSValue* numberProtoFuncToPrecision(ExecState* exec, JSObject* thisObj, const Li
if (e == precision - 1)
return jsString(s + m);
else if (e >= 0) {
if (e >= 0) {
if (e + 1 < m.size())
return jsString(s + m.substr(0, e + 1) + "." + m.substr(e + 1));
return jsString(s + m);
......@@ -463,7 +462,7 @@ const ClassInfo NumberObjectImp::info = { "Function", &InternalFunctionImp::info
@end
*/
NumberObjectImp::NumberObjectImp(ExecState* exec, FunctionPrototype* funcProto, NumberPrototype* numberProto)
: InternalFunctionImp(funcProto)
: InternalFunctionImp(funcProto, numberProto->classInfo()->className)
{
// Number.Prototype
putDirect(exec->propertyNames().prototype, numberProto, DontEnum|DontDelete|ReadOnly);
......@@ -481,17 +480,18 @@ JSValue* NumberObjectImp::getValueProperty(ExecState*, int token) const
{
// ECMA 15.7.3
switch (token) {
case NaNValue:
return jsNaN();
case NegInfinity:
return jsNumberCell(-Inf);
case PosInfinity:
return jsNumberCell(Inf);
case MaxValue:
return jsNumberCell(1.7976931348623157E+308);
case MinValue:
return jsNumberCell(5E-324);
case NaNValue:
return jsNaN();
case NegInfinity:
return jsNumberCell(-Inf);
case PosInfinity:
return jsNumberCell(Inf);
case MaxValue:
return jsNumberCell(1.7976931348623157E+308);
case MinValue:
return jsNumberCell(5E-324);
}
ASSERT_NOT_REACHED();
return jsNull();
}
......@@ -506,6 +506,7 @@ JSObject* NumberObjectImp::construct(ExecState* exec, const List& args)
JSObject* proto = exec->lexicalGlobalObject()->numberPrototype();
NumberInstance* obj = new NumberInstance(proto);
// FIXME: Check args[0]->isUndefined() instead of args.isEmpty()?
double n = args.isEmpty() ? 0 : args[0]->toNumber(exec);
obj->setInternalValue(jsNumber(n));
return obj;
......@@ -514,8 +515,8 @@ JSObject* NumberObjectImp::construct(ExecState* exec, const List& args)
// ECMA 15.7.2
JSValue* NumberObjectImp::callAsFunction(ExecState* exec, JSObject*, const List& args)
{
double n = args.isEmpty() ? 0 : args[0]->toNumber(exec);
return jsNumber(n);
// FIXME: Check args[0]->isUndefined() instead of args.isEmpty()?
return jsNumber(args.isEmpty() ? 0 : args[0]->toNumber(exec));
}
} // namespace KJS
......@@ -175,7 +175,7 @@ JSValue* objectProtoFuncToString(ExecState*, JSObject* thisObj, const List&)
// ------------------------------ ObjectObjectImp --------------------------------
ObjectObjectImp::ObjectObjectImp(ExecState* exec, ObjectPrototype* objProto, FunctionPrototype* funcProto)
: InternalFunctionImp(funcProto)
: InternalFunctionImp(funcProto, "Object")
{
// ECMA 15.2.3.1
putDirect(exec->propertyNames().prototype, objProto, DontEnum|DontDelete|ReadOnly);
......
......@@ -285,7 +285,7 @@ struct RegExpObjectImpPrivate {
};
RegExpObjectImp::RegExpObjectImp(ExecState* exec, FunctionPrototype* funcProto, RegExpPrototype* regProto)
: InternalFunctionImp(funcProto)
: InternalFunctionImp(funcProto, "RegExp")
, d(new RegExpObjectImpPrivate)
{
// ECMA 15.10.5.1 RegExp.prototype
......
// -*- c-basic-offset: 2 -*-
/*
* Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
* Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -987,10 +987,8 @@ JSValue* stringProtoFuncLink(ExecState* exec, JSObject* thisObj, const List& arg
// ------------------------------ StringObjectImp ------------------------------
StringObjectImp::StringObjectImp(ExecState* exec,
FunctionPrototype* funcProto,
StringPrototype* stringProto)
: InternalFunctionImp(funcProto)
StringObjectImp::StringObjectImp(ExecState* exec, FunctionPrototype* funcProto, StringPrototype* stringProto)
: InternalFunctionImp(funcProto, stringProto->classInfo()->className)
{
// ECMA 15.5.3.1 String.prototype
putDirect(exec->propertyNames().prototype, stringProto, DontEnum|DontDelete|ReadOnly);
......
2008-01-27 Darin Adler <darin@apple.com>
Reviewed by Oliver.
- test for http://bugs.webkit.org/show_bug.cgi?id=16498
''.constructor.toString() gives [function]
* fast/js/function-names-expected.txt: Updated for new tests.
* fast/js/kde/resources/function.js: Updated test to expect the format that Gecko uses
for native code, which we now match character for character.
* fast/js/resources/function-names.js: Added tests for the names of all the constructors.
2008-01-27 Matt Perry <mpComplete@gmail.com>
Reviewed by Darin.
......
This test checks the names of functions constructed two different ways.
This test checks the names of all sorts of different functions.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new Function('1').toString().replace(/[ \n]+/g, ' ') is 'function anonymous() { 1; }'
PASS document.documentElement.onclick.toString().replace(/[ \n]+/g, ' ') is 'function onclick(event) { 2; }'
PASS new Function('return 1').toString().replace(/[ \n]+/g, ' ') is 'function anonymous() { return 1; }'
PASS document.documentElement.onclick.toString().replace(/[ \n]+/g, ' ') is 'function onclick(event) { return 2; }'
PASS ''.constructor is String
PASS Boolean.toString() is 'function Boolean() {\n [native code]\n}'
PASS Date.toString() is 'function Date() {\n [native code]\n}'
PASS Error.toString() is 'function Error() {\n [native code]\n}'
PASS EvalError.toString() is 'function EvalError() {\n [native code]\n}'
PASS Function.toString() is 'function Function() {\n [native code]\n}'
PASS Number.toString() is 'function Number() {\n [native code]\n}'
PASS Object.toString() is 'function Object() {\n [native code]\n}'
PASS RangeError.toString() is 'function RangeError() {\n [native code]\n}'
PASS ReferenceError.toString() is 'function ReferenceError() {\n [native code]\n}'
PASS RegExp.toString() is 'function RegExp() {\n [native code]\n}'
PASS String.toString() is 'function String() {\n [native code]\n}'
PASS SyntaxError.toString() is 'function SyntaxError() {\n [native code]\n}'
PASS TypeError.toString() is 'function TypeError() {\n [native code]\n}'
PASS URIError.toString() is 'function URIError() {\n [native code]\n}'
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -160,7 +160,7 @@ function groupFunc(a, b) { return (a+b)*3; } // check for () being preserved
eval("var groupClone = " + groupFunc);
shouldBe("groupClone(1, 2)", "9");
var sinStr = '\nfunction sin() {\n [native code]\n}\n'
var sinStr = 'function sin() {\n [native code]\n}'
shouldBe("String(Math.sin)", "sinStr");
///////////////////////////////
......
description(
"This test checks the names of functions constructed two different ways."
"This test checks the names of all sorts of different functions."
);
document.documentElement.setAttribute("onclick", "2");
document.documentElement.setAttribute("onclick", "return 2");
shouldBe("new Function('1').toString().replace(/[ \\n]+/g, ' ')", "'function anonymous() { 1; }'");
shouldBe("document.documentElement.onclick.toString().replace(/[ \\n]+/g, ' ')", "'function onclick(event) { 2; }'");
shouldBe("new Function('return 1').toString().replace(/[ \\n]+/g, ' ')", "'function anonymous() { return 1; }'");
shouldBe("document.documentElement.onclick.toString().replace(/[ \\n]+/g, ' ')", "'function onclick(event) { return 2; }'");
shouldBe("''.constructor", "String");
function checkConstructorName(name)
{
shouldBe(name + ".toString()", "'function " + name + "() {\\n [native code]\\n}'");
}
checkConstructorName("Boolean");
checkConstructorName("Date");
checkConstructorName("Error");
checkConstructorName("EvalError");
checkConstructorName("Function");
checkConstructorName("Number");
checkConstructorName("Object");
checkConstructorName("RangeError");
checkConstructorName("ReferenceError");
checkConstructorName("RegExp");
checkConstructorName("String");
checkConstructorName("SyntaxError");
checkConstructorName("TypeError");
checkConstructorName("URIError");
var successfullyParsed = true;
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