[WebIDL] All interface objects must have a property named "name"
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Aug 2015 16:58:57 +0000 (16:58 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Aug 2015 16:58:57 +0000 (16:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=147865

Reviewed by Darin Adler.

Source/WebCore:

As per the Web IDL specification, all interface objects must have a
property named "name" with attributes
{ [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }
whose value is the identifier of the corresponding interface:
http://heycam.github.io/webidl/#es-interface-call
http://heycam.github.io/webidl/#named-constructors

Previously, our interface objects had no such property, this patch
addresses the problem.

Both Firefox 38 and Chrome 44 comply with the Web IDL specification
here.

Test: fast/dom/interface-name-property.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorConstructor::finishCreation):
(WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodeConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::JSTestNondeterministicConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::finishCreation):
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattributeConstructor::finishCreation):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonlyConstructor::finishCreation):
Rebaseline bindings tests.

LayoutTests:

Add layout test to check that the 'name' property on interface
objects has the following attributes:
{ [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }

* fast/dom/interface-name-property-expected.txt: Added.
* fast/dom/interface-name-property.html: Added.
New test.

* media/track/track-cue-empty-cue-text-expected.txt:
Rebaseline, this is a progression.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188258 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/interface-name-property-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/interface-name-property.html [new file with mode: 0644]
LayoutTests/media/track/track-cue-empty-cue-text-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp

index 167ebae..1ca6410 100644 (file)
@@ -1,3 +1,21 @@
+2015-08-11  Chris Dumez  <cdumez@apple.com>
+
+        [WebIDL] All interface objects must have a property named "name"
+        https://bugs.webkit.org/show_bug.cgi?id=147865
+
+        Reviewed by Darin Adler.
+
+        Add layout test to check that the 'name' property on interface
+        objects has the following attributes:
+        { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }
+
+        * fast/dom/interface-name-property-expected.txt: Added.
+        * fast/dom/interface-name-property.html: Added.
+        New test.
+
+        * media/track/track-cue-empty-cue-text-expected.txt:
+        Rebaseline, this is a progression.
+
 2015-08-10  Chris Dumez  <cdumez@apple.com>
 
         The 'prototype' property on interface objects should not be enumerable
diff --git a/LayoutTests/fast/dom/interface-name-property-expected.txt b/LayoutTests/fast/dom/interface-name-property-expected.txt
new file mode 100644 (file)
index 0000000..8a8b13e
--- /dev/null
@@ -0,0 +1,39 @@
+The 'name' property on interface objects should have attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+* Event
+PASS descriptor.writable is false
+PASS descriptor.enumerable is false
+PASS descriptor.configurable is true
+PASS descriptor.value is "Event"
+* Element
+PASS descriptor.writable is false
+PASS descriptor.enumerable is false
+PASS descriptor.configurable is true
+PASS descriptor.value is "Element"
+* Document
+PASS descriptor.writable is false
+PASS descriptor.enumerable is false
+PASS descriptor.configurable is true
+PASS descriptor.value is "Document"
+* Window
+PASS descriptor.writable is false
+PASS descriptor.enumerable is false
+PASS descriptor.configurable is true
+PASS descriptor.value is "Window"
+* HTMLOptionElement
+PASS descriptor.writable is false
+PASS descriptor.enumerable is false
+PASS descriptor.configurable is true
+PASS descriptor.value is "HTMLOptionElement"
+* Option
+PASS descriptor.writable is false
+PASS descriptor.enumerable is false
+PASS descriptor.configurable is true
+PASS descriptor.value is "Option"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/interface-name-property.html b/LayoutTests/fast/dom/interface-name-property.html
new file mode 100644 (file)
index 0000000..6da9c3b
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../resources/js-test-pre.js"></script>
+<script>
+description("The 'name' property on interface objects should have attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }");
+
+debug("* Event");
+var descriptor = Object.getOwnPropertyDescriptor(Event, "name");
+shouldBeFalse("descriptor.writable");
+shouldBeFalse("descriptor.enumerable");
+shouldBeTrue("descriptor.configurable");
+shouldBeEqualToString("descriptor.value", "Event");
+
+debug("* Element");
+var descriptor = Object.getOwnPropertyDescriptor(Element, "name");
+shouldBeFalse("descriptor.writable");
+shouldBeFalse("descriptor.enumerable");
+shouldBeTrue("descriptor.configurable");
+shouldBeEqualToString("descriptor.value", "Element");
+
+debug("* Document");
+var descriptor = Object.getOwnPropertyDescriptor(Document, "name");
+shouldBeFalse("descriptor.writable");
+shouldBeFalse("descriptor.enumerable");
+shouldBeTrue("descriptor.configurable");
+shouldBeEqualToString("descriptor.value", "Document");
+
+debug("* Window");
+var descriptor = Object.getOwnPropertyDescriptor(Window, "name");
+shouldBeFalse("descriptor.writable");
+shouldBeFalse("descriptor.enumerable");
+shouldBeTrue("descriptor.configurable");
+shouldBeEqualToString("descriptor.value", "Window");
+
+debug("* HTMLOptionElement");
+var descriptor = Object.getOwnPropertyDescriptor(HTMLOptionElement, "name");
+shouldBeFalse("descriptor.writable");
+shouldBeFalse("descriptor.enumerable");
+shouldBeTrue("descriptor.configurable");
+shouldBeEqualToString("descriptor.value", "HTMLOptionElement");
+
+debug("* Option");
+var descriptor = Object.getOwnPropertyDescriptor(Option, "name");
+shouldBeFalse("descriptor.writable");
+shouldBeFalse("descriptor.enumerable");
+shouldBeTrue("descriptor.configurable");
+shouldBeEqualToString("descriptor.value", "Option");
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
index 76da5f0..213f339 100644 (file)
@@ -7,7 +7,7 @@ EXPECTED (fragment != 'null') OK
 ** The document fragment should have one child, an empty Text node **
 EXPECTED (fragment.childNodes.length == '1') OK
 EXPECTED (fragment.childNodes[0].length == '0') OK
-EXPECTED (fragment.childNodes[0].constructor.name == 'undefined') OK
+EXPECTED (fragment.childNodes[0].constructor.name == 'Text') OK
 
 END OF TEST
 
index 1c45096..e897646 100644 (file)
@@ -1,3 +1,67 @@
+2015-08-11  Chris Dumez  <cdumez@apple.com>
+
+        [WebIDL] All interface objects must have a property named "name"
+        https://bugs.webkit.org/show_bug.cgi?id=147865
+
+        Reviewed by Darin Adler.
+
+        As per the Web IDL specification, all interface objects must have a
+        property named "name" with attributes
+        { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }
+        whose value is the identifier of the corresponding interface:
+        http://heycam.github.io/webidl/#es-interface-call
+        http://heycam.github.io/webidl/#named-constructors
+
+        Previously, our interface objects had no such property, this patch
+        addresses the problem.
+
+        Both Firefox 38 and Chrome 44 comply with the Web IDL specification
+        here.
+
+        Test: fast/dom/interface-name-property.html
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateConstructorHelperMethods):
+
+        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+        (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
+        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
+        (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+        (WebCore::JSTestEventConstructorConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+        (WebCore::JSTestEventTargetConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestException.cpp:
+        (WebCore::JSTestExceptionConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
+        (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        (WebCore::JSTestInterfaceConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+        (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
+        (WebCore::JSTestNamedConstructorConstructor::finishCreation):
+        (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestNode.cpp:
+        (WebCore::JSTestNodeConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
+        (WebCore::JSTestNondeterministicConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::JSTestObjConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+        (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        (WebCore::JSTestTypedefsConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSattribute.cpp:
+        (WebCore::JSattributeConstructor::finishCreation):
+        * bindings/scripts/test/JS/JSreadonly.cpp:
+        (WebCore::JSreadonlyConstructor::finishCreation):
+        Rebaseline bindings tests.
+
 2015-08-11  Ting-Wei Lan  <lantw44@gmail.com>
 
         Fix debug build when optimization is enabled
index 0f04397..50def08 100644 (file)
@@ -4792,6 +4792,8 @@ sub GenerateConstructorHelperMethods
         push(@$outputArray, "    putDirect(vm, vm.propertyNames->prototype, ${className}::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);\n");
     }
 
+    push(@$outputArray, "    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral(\"$visibleInterfaceName\"))), ReadOnly | DontEnum);\n");
+
     if (defined $leastConstructorLength) {
         push(@$outputArray, "    putDirect(vm, vm.propertyNames->length, jsNumber(${leastConstructorLength}), ReadOnly | DontDelete | DontEnum);\n");
     }
index 7974276..5013a72 100644 (file)
@@ -118,6 +118,7 @@ void JSTestActiveDOMObjectConstructor::finishCreation(VM& vm, JSDOMGlobalObject*
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestActiveDOMObject::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestActiveDOMObject"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index 649a394..228d990 100644 (file)
@@ -92,6 +92,7 @@ void JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation(VM&
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestCustomConstructorWithNoInterfaceObject::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomConstructorWithNoInterfaceObject"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index 8eae9bf..ce412fa 100644 (file)
@@ -112,6 +112,7 @@ void JSTestCustomNamedGetterConstructor::finishCreation(VM& vm, JSDOMGlobalObjec
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestCustomNamedGetter::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomNamedGetter"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index 3c0c352..eded162 100644 (file)
@@ -139,6 +139,7 @@ void JSTestEventConstructorConstructor::finishCreation(VM& vm, JSDOMGlobalObject
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestEventConstructor::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventConstructor"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
 }
 
index 99fd64b..ca6a351 100644 (file)
@@ -121,6 +121,7 @@ void JSTestEventTargetConstructor::finishCreation(VM& vm, JSDOMGlobalObject* glo
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestEventTarget::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventTarget"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index 1f8e6bd..0b1d8f8 100644 (file)
@@ -109,6 +109,7 @@ void JSTestExceptionConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globa
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestException::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestException"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index f0c466e..cb14c02 100644 (file)
@@ -91,6 +91,7 @@ void JSTestGenerateIsReachableConstructor::finishCreation(VM& vm, JSDOMGlobalObj
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachable::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestGenerateIsReachable"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index 8ff6518..0e41268 100644 (file)
@@ -301,6 +301,7 @@ void JSTestInterfaceConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globa
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestInterface::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestInterface"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
     reifyStaticProperties(vm, JSTestInterfaceConstructorTableValues, *this);
 }
index 3efcc5c..8980422 100644 (file)
@@ -98,6 +98,7 @@ void JSTestMediaQueryListListenerConstructor::finishCreation(VM& vm, JSDOMGlobal
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestMediaQueryListListener::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestMediaQueryListListener"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index f21e7a1..594fc74 100644 (file)
@@ -119,6 +119,7 @@ void JSTestNamedConstructorConstructor::finishCreation(VM& vm, JSDOMGlobalObject
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedConstructor"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
@@ -157,6 +158,7 @@ void JSTestNamedConstructorNamedConstructor::finishCreation(VM& vm, JSDOMGlobalO
     Base::finishCreation(globalObject);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Audio"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index 5251581..1af0e9b 100644 (file)
@@ -103,6 +103,7 @@ void JSTestNodeConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObje
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestNode::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNode"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index 2d7e7f4..f0bf63d 100644 (file)
@@ -115,6 +115,7 @@ void JSTestNondeterministicConstructor::finishCreation(VM& vm, JSDOMGlobalObject
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestNondeterministic::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNondeterministic"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index 6fead09..3a588c0 100644 (file)
@@ -475,6 +475,7 @@ void JSTestObjConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObjec
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestObj::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestObject"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
     reifyStaticProperties(vm, JSTestObjConstructorTableValues, *this);
 }
index 1395804..3537a22 100644 (file)
@@ -179,6 +179,7 @@ void JSTestOverloadedConstructorsConstructor::finishCreation(VM& vm, JSDOMGlobal
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructors::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverloadedConstructors"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
 }
 
index 731ab4b..1f742ad 100644 (file)
@@ -106,6 +106,7 @@ void JSTestSerializedScriptValueInterfaceConstructor::finishCreation(VM& vm, JSD
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestSerializedScriptValueInterface::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializedScriptValueInterface"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index 41edb3b..b80f4bd 100644 (file)
@@ -171,6 +171,7 @@ void JSTestTypedefsConstructor::finishCreation(VM& vm, JSDOMGlobalObject* global
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSTestTypedefs::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestTypedefs"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
     reifyStaticProperties(vm, JSTestTypedefsConstructorTableValues, *this);
 }
index 39409b4..3b9d12e 100644 (file)
@@ -95,6 +95,7 @@ void JSattributeConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObj
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSattribute::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("attribute"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }
 
index 6cfb3d2..613099e 100644 (file)
@@ -91,6 +91,7 @@ void JSreadonlyConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObje
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
     putDirect(vm, vm.propertyNames->prototype, JSreadonly::getPrototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("readonly"))), ReadOnly | DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
 }