Skip to content

Commit

Permalink
[WebIDL] Align property order of DOM constructors with ECMA-262 count…
Browse files Browse the repository at this point in the history
…erparts

https://bugs.webkit.org/show_bug.cgi?id=230584

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

This is being upstreamed at web-platform-tests/wpt#30333.

* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any-expected.txt: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.html: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.js: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker-expected.txt: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker.html: Added.

Source/WebCore:

This patch implements spec proposal [1] on matching property order of DOM constructors
with ECMA-262 functions: "length", "name", "prototype". Aligns WebKit with Blink and Gecko.
Also, groups property puts to remove 2 extra `$interface->isNamespaceObject` checks.

No behavior change except for enumeration order.

[1] whatwg/webidl#914

Tests: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.html
       imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/*: Updated.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@283233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
[email protected] committed Sep 29, 2021
1 parent c9fee8e commit e4ad0e3
Show file tree
Hide file tree
Showing 89 changed files with 258 additions and 187 deletions.
15 changes: 15 additions & 0 deletions LayoutTests/imported/w3c/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
2021-09-29 Alexey Shvayka <[email protected]>

[WebIDL] Align property order of DOM constructors with ECMA-262 counterparts
https://bugs.webkit.org/show_bug.cgi?id=230584

Reviewed by Alex Christensen.

This is being upstreamed at https://github.com/web-platform-tests/wpt/pull/30333.

* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any-expected.txt: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.html: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.js: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker-expected.txt: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker.html: Added.

2021-09-29 Aditya Keerthi <[email protected]>

Update css-ui WPT
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

PASS Constructor property enumeration order of "length", "name", and "prototype"
PASS Method property enumeration order of "length" and "name"
PASS Getter property enumeration order of "length" and "name"

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- This file is required for WebKit test infrastructure to run the templated test -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use strict";

test(() => {
const ownPropKeys = Reflect.ownKeys(Blob).slice(0, 3);
assert_array_equals(ownPropKeys, ["length", "name", "prototype"]);
}, 'Constructor property enumeration order of "length", "name", and "prototype"');

test(() => {
assert_own_property(Blob.prototype, "slice");

const ownPropKeys = Reflect.ownKeys(Blob.prototype.slice).slice(0, 2);
assert_array_equals(ownPropKeys, ["length", "name"]);
}, 'Method property enumeration order of "length" and "name"');

test(() => {
assert_own_property(Blob.prototype, "size");

const desc = Reflect.getOwnPropertyDescriptor(Blob.prototype, "size");
assert_equals(typeof desc.get, "function");

const ownPropKeys = Reflect.ownKeys(desc.get).slice(0, 2);
assert_array_equals(ownPropKeys, ["length", "name"]);
}, 'Getter property enumeration order of "length" and "name"');
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

PASS Constructor property enumeration order of "length", "name", and "prototype"
PASS Method property enumeration order of "length" and "name"
PASS Getter property enumeration order of "length" and "name"

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- This file is required for WebKit test infrastructure to run the templated test -->
22 changes: 22 additions & 0 deletions Source/WebCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
2021-09-29 Alexey Shvayka <[email protected]>

[WebIDL] Align property order of DOM constructors with ECMA-262 counterparts
https://bugs.webkit.org/show_bug.cgi?id=230584

Reviewed by Alex Christensen.

This patch implements spec proposal [1] on matching property order of DOM constructors
with ECMA-262 functions: "length", "name", "prototype". Aligns WebKit with Blink and Gecko.
Also, groups property puts to remove 2 extra `$interface->isNamespaceObject` checks.

No behavior change except for enumeration order.

[1] https://github.com/heycam/webidl/pull/914

Tests: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.html
imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/*: Updated.

2021-09-29 Olivier Blin <[email protected]>

Fix typo in RenderSVGBlock::updateFromStyle comment
Expand Down
45 changes: 22 additions & 23 deletions Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7795,36 +7795,35 @@ sub GenerateConstructorHelperMethods
push(@$outputArray, "template<> void ${constructorClassName}::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)\n");
push(@$outputArray, "{\n");

# There must exist an interface prototype object for every non-callback interface defined, regardless
# of whether the interface was declared with the [LegacyNoInterfaceObject] extended attribute.
# https://heycam.github.io/webidl/#interface-prototype-object
if (ShouldUseGlobalObjectPrototype($interface)) {
push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n");
} elsif ($interface->isCallback) {
push(@$outputArray, " UNUSED_PARAM(globalObject);\n");
} elsif ($interface->isNamespaceObject) {
assert("jsNontrivialString() requires strings two or more characters long") if length($visibleInterfaceName) < 2;
if ($interface->isNamespaceObject) {
push(@$outputArray, " JSC_TO_STRING_TAG_WITHOUT_TRANSITION();\n");
} else {
push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${className}::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n");
}
# FIXME: Remove TextTrackCue constructor along with [LegacyFactoryFunctionEnabledBySetting] extended attribute.
# https://bugs.webkit.org/show_bug.cgi?id=129615
if ($interface->extendedAttributes->{LegacyFactoryFunctionEnabledBySetting}) {
my $runtimeEnableConditionalString = GenerateRuntimeEnableConditionalString($interface, $interface, "&globalObject");
push(@$outputArray, " int constructorLength = ${leastConstructorLength};\n");
push(@$outputArray, " if (!${runtimeEnableConditionalString})\n");
push(@$outputArray, " constructorLength = 0;\n");
push(@$outputArray, " putDirect(vm, vm.propertyNames->length, jsNumber(constructorLength), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n");
} else {
push(@$outputArray, " putDirect(vm, vm.propertyNames->length, jsNumber(${leastConstructorLength}), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n");
}

assert("jsNontrivialString() requires strings two or more characters long") if length($visibleInterfaceName) < 2;
if (!$interface->isNamespaceObject) {
# FIXME: Align property order of DOM constructors with ECMA-262 counterparts
# https://bugs.webkit.org/show_bug.cgi?id=230584
push(@$outputArray, " JSString* nameString = jsNontrivialString(vm, \"$visibleInterfaceName\"_s);\n");
push(@$outputArray, " m_originalName.set(vm, this, nameString);\n");
push(@$outputArray, " putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n");
}

if ($interface->extendedAttributes->{LegacyFactoryFunctionEnabledBySetting}) {
my $runtimeEnableConditionalString = GenerateRuntimeEnableConditionalString($interface, $interface, "&globalObject");
push(@$outputArray, " int constructorLength = ${leastConstructorLength};\n");
push(@$outputArray, " if (!${runtimeEnableConditionalString})\n");
push(@$outputArray, " constructorLength = 0;\n");
push(@$outputArray, " putDirect(vm, vm.propertyNames->length, jsNumber(constructorLength), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n");
} elsif (!$interface->isNamespaceObject) {
push(@$outputArray, " putDirect(vm, vm.propertyNames->length, jsNumber(${leastConstructorLength}), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n");
# There must exist an interface prototype object for every non-callback interface defined, regardless
# of whether the interface was declared with the [LegacyNoInterfaceObject] extended attribute.
# https://heycam.github.io/webidl/#interface-prototype-object
if ($interface->isCallback) {
push(@$outputArray, " UNUSED_PARAM(globalObject);\n");
} else {
my $prototype = ShouldUseGlobalObjectPrototype($interface) ? "globalObject.getPrototypeDirect(vm)" : "${className}::prototype(vm, globalObject)";
push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${prototype}, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete);\n");
}
}

my $classForThis = "${className}::info()";
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/bindings/scripts/test/JS/JSDOMWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ template<> JSValue JSDOMWindowDOMConstructor::prototypeForStructure(JSC::VM& vm,

template<> void JSDOMWindowDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
JSString* nameString = jsNontrivialString(vm, "DOMWindow"_s);
m_originalName.set(vm, this, nameString);
putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete);
}

/* Hash table for prototype */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ template<> JSValue JSDedicatedWorkerGlobalScopeDOMConstructor::prototypeForStruc

template<> void JSDedicatedWorkerGlobalScopeDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
JSString* nameString = jsNontrivialString(vm, "DedicatedWorkerGlobalScope"_s);
m_originalName.set(vm, this, nameString);
putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete);
}

/* Hash table for prototype */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ template<> JSValue JSExposedToWorkerAndWindowDOMConstructor::prototypeForStructu

template<> void JSExposedToWorkerAndWindowDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSExposedToWorkerAndWindow::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
JSString* nameString = jsNontrivialString(vm, "ExposedToWorkerAndWindow"_s);
m_originalName.set(vm, this, nameString);
putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->prototype, JSExposedToWorkerAndWindow::prototype(vm, globalObject), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete);
}

/* Hash table for prototype */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ template<> JSValue JSPaintWorkletGlobalScopeDOMConstructor::prototypeForStructur

template<> void JSPaintWorkletGlobalScopeDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
JSString* nameString = jsNontrivialString(vm, "PaintWorkletGlobalScope"_s);
m_originalName.set(vm, this, nameString);
putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete);
}

/* Hash table for prototype */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ template<> JSValue JSServiceWorkerGlobalScopeDOMConstructor::prototypeForStructu

template<> void JSServiceWorkerGlobalScopeDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
JSString* nameString = jsNontrivialString(vm, "ServiceWorkerGlobalScope"_s);
m_originalName.set(vm, this, nameString);
putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete);
}

/* Hash table for prototype */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ template<> JSValue JSSharedWorkerGlobalScopeDOMConstructor::prototypeForStructur

template<> void JSSharedWorkerGlobalScopeDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
JSString* nameString = jsNontrivialString(vm, "SharedWorkerGlobalScope"_s);
m_originalName.set(vm, this, nameString);
putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete);
}

/* Hash table for prototype */
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ template<> JSValue JSTestCEReactionsDOMConstructor::prototypeForStructure(JSC::V

template<> void JSTestCEReactionsDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSTestCEReactions::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
JSString* nameString = jsNontrivialString(vm, "TestCEReactions"_s);
m_originalName.set(vm, this, nameString);
putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->prototype, JSTestCEReactions::prototype(vm, globalObject), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete);
}

/* Hash table for prototype */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ template<> JSValue JSTestCEReactionsStringifierDOMConstructor::prototypeForStruc

template<> void JSTestCEReactionsStringifierDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSTestCEReactionsStringifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
JSString* nameString = jsNontrivialString(vm, "TestCEReactionsStringifier"_s);
m_originalName.set(vm, this, nameString);
putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->prototype, JSTestCEReactionsStringifier::prototype(vm, globalObject), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete);
}

/* Hash table for prototype */
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ template<> JSValue JSTestCallTracerDOMConstructor::prototypeForStructure(JSC::VM

template<> void JSTestCallTracerDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSTestCallTracer::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
JSString* nameString = jsNontrivialString(vm, "TestCallTracer"_s);
m_originalName.set(vm, this, nameString);
putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->prototype, JSTestCallTracer::prototype(vm, globalObject), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete);
reifyStaticProperties(vm, JSTestCallTracer::info(), JSTestCallTracerConstructorTableValues, *this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ template<> JSValue JSTestCallbackInterfaceDOMConstructor::prototypeForStructure(

template<> void JSTestCallbackInterfaceDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
UNUSED_PARAM(globalObject);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
JSString* nameString = jsNontrivialString(vm, "TestCallbackInterface"_s);
m_originalName.set(vm, this, nameString);
putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
UNUSED_PARAM(globalObject);
reifyStaticProperties(vm, nullptr, JSTestCallbackInterfaceConstructorTableValues, *this);
}

Expand Down
Loading

0 comments on commit e4ad0e3

Please sign in to comment.