Diff
Modified: trunk/JSTests/ChangeLog (244019 => 244020)
--- trunk/JSTests/ChangeLog 2019-04-08 14:45:08 UTC (rev 244019)
+++ trunk/JSTests/ChangeLog 2019-04-08 15:51:19 UTC (rev 244020)
@@ -1,3 +1,16 @@
+2019-04-08 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r243943.
+
+ Caused test262 failures.
+
+ Reverted changeset:
+
+ "[JSC] Filter DontEnum properties in
+ ProxyObject::getOwnPropertyNames()"
+ https://bugs.webkit.org/show_bug.cgi?id=176810
+ https://trac.webkit.org/changeset/243943
+
2019-04-07 Michael Saboff <[email protected]>
REGRESSION (r243642): Crash in reddit.com page
Modified: trunk/JSTests/stress/proxy-own-keys.js (244019 => 244020)
--- trunk/JSTests/stress/proxy-own-keys.js 2019-04-08 14:45:08 UTC (rev 244019)
+++ trunk/JSTests/stress/proxy-own-keys.js 2019-04-08 15:51:19 UTC (rev 244020)
@@ -135,22 +135,6 @@
assert(called);
called = false;
}
-
- for (let i = 0; i < 500; i++) {
- let threw = false;
- let foundKey = false;
- try {
- for (let k in proxy)
- foundKey = true;
- } catch(e) {
- threw = true;
- assert(e.toString() === "TypeError: Proxy object's non-extensible 'target' has configurable property 'x' that was not in the result from the 'ownKeys' trap");
- assert(!foundKey);
- }
- assert(threw);
- assert(called);
- called = false;
- }
}
{
@@ -182,22 +166,6 @@
assert(called);
called = false;
}
-
- for (let i = 0; i < 500; i++) {
- let threw = false;
- let reached = false;
- try {
- for (let k in proxy)
- reached = true;
- } catch (e) {
- threw = true;
- assert(e.toString() === "TypeError: Proxy handler's 'ownKeys' method returned a key that was not present in its non-extensible target");
- }
- assert(threw);
- assert(called);
- assert(!reached);
- called = false;
- }
}
{
@@ -699,68 +667,3 @@
error = null;
}
}
-
-{
- let error = null;
- let s1 = Symbol();
- let s2 = Symbol();
- let target = Object.defineProperties({}, {
- x: {
- value: "X",
- enumerable: true,
- configurable: true,
- },
- dontEnum1: {
- value: "dont-enum",
- enumerable: false,
- configurable: true,
- },
- y: {
- get() { return "Y"; },
- enumerable: true,
- configurable: true,
- },
- dontEnum2: {
- get() { return "dont-enum-accessor" },
- enumerable: false,
- configurable: true
- },
- [s1]: {
- value: "s1",
- enumerable: true,
- configurable: true,
- },
- [s2]: {
- value: "dont-enum-symbol",
- enumerable: false,
- configurable: true,
- },
- });
- let checkedOwnKeys = false;
- let checkedPropertyDescriptor = false;
- let handler = {
- ownKeys() {
- checkedOwnKeys = true;
- return ["x", "dontEnum1", "y", "dontEnum2", s1, s2];
- },
- getOwnPropertyDescriptor(t, k) {
- checkedPropertyDescriptors = true;
- return Reflect.getOwnPropertyDescriptor(t, k);
- }
- };
- let proxy = new Proxy(target, handler);
- for (let i = 0; i < 500; i++) {
- checkedPropertyDescriptors = false;
- assert(shallowEq(["x", "dontEnum1", "y", "dontEnum2", s1, s2], Reflect.ownKeys(proxy)));
- assert(checkedOwnKeys);
- assert(!checkedPropertyDescriptors);
- checkedOwnKeys = false;
-
- let enumerableStringKeys = [];
- for (let k in proxy)
- enumerableStringKeys.push(k);
- assert(shallowEq(["x", "y"], enumerableStringKeys));
- assert(checkedOwnKeys);
- assert(checkedPropertyDescriptors);
- }
-}
Modified: trunk/Source/_javascript_Core/ChangeLog (244019 => 244020)
--- trunk/Source/_javascript_Core/ChangeLog 2019-04-08 14:45:08 UTC (rev 244019)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-04-08 15:51:19 UTC (rev 244020)
@@ -1,3 +1,16 @@
+2019-04-08 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r243943.
+
+ Caused test262 failures.
+
+ Reverted changeset:
+
+ "[JSC] Filter DontEnum properties in
+ ProxyObject::getOwnPropertyNames()"
+ https://bugs.webkit.org/show_bug.cgi?id=176810
+ https://trac.webkit.org/changeset/243943
+
2019-04-08 Claudio Saavedra <[email protected]>
[JSC] Partially fix the build with unified builds disabled
Modified: trunk/Source/_javascript_Core/runtime/PropertyNameArray.h (244019 => 244020)
--- trunk/Source/_javascript_Core/runtime/PropertyNameArray.h 2019-04-08 14:45:08 UTC (rev 244019)
+++ trunk/Source/_javascript_Core/runtime/PropertyNameArray.h 2019-04-08 15:51:19 UTC (rev 244020)
@@ -55,12 +55,6 @@
{
}
- void reset()
- {
- m_set.clear();
- m_data = PropertyNameArrayData::create();
- }
-
VM* vm() { return m_vm; }
void add(uint32_t index)
Modified: trunk/Source/_javascript_Core/runtime/ProxyObject.cpp (244019 => 244020)
--- trunk/Source/_javascript_Core/runtime/ProxyObject.cpp 2019-04-08 14:45:08 UTC (rev 244019)
+++ trunk/Source/_javascript_Core/runtime/ProxyObject.cpp 2019-04-08 15:51:19 UTC (rev 244020)
@@ -1006,33 +1006,19 @@
}
}
- if (!targetIsExensible) {
- for (UniquedStringImpl* impl : targetConfigurableKeys) {
- if (removeIfContainedInUncheckedResultKeys(impl) == IsNotContainedIn) {
- throwVMTypeError(exec, scope, makeString("Proxy object's non-extensible 'target' has configurable property '", String(impl), "' that was not in the result from the 'ownKeys' trap"));
- return;
- }
- }
+ if (targetIsExensible)
+ return;
- if (uncheckedResultKeys.size()) {
- throwVMTypeError(exec, scope, "Proxy handler's 'ownKeys' method returned a key that was not present in its non-extensible target"_s);
+ for (UniquedStringImpl* impl : targetConfigurableKeys) {
+ if (removeIfContainedInUncheckedResultKeys(impl) == IsNotContainedIn) {
+ throwVMTypeError(exec, scope, makeString("Proxy object's non-extensible 'target' has configurable property '", String(impl), "' that was not in the result from the 'ownKeys' trap"));
return;
}
}
- if (!enumerationMode.includeDontEnumProperties()) {
- // Filtering DontEnum properties is observable in proxies and must occur following the invariant checks above.
- auto data = ""
- trapResult.reset();
-
- for (auto propertyName : data->propertyNameVector()) {
- PropertySlot slot(this, PropertySlot::InternalMethodType::GetOwnProperty);
- if (!getOwnPropertySlotCommon(exec, propertyName, slot))
- continue;
- if (slot.attributes() & PropertyAttribute::DontEnum)
- continue;
- trapResult.addUnchecked(propertyName.impl());
- }
+ if (uncheckedResultKeys.size()) {
+ throwVMTypeError(exec, scope, "Proxy handler's 'ownKeys' method returned a key that was not present in its non-extensible target"_s);
+ return;
}
}
Modified: trunk/Source/WebCore/ChangeLog (244019 => 244020)
--- trunk/Source/WebCore/ChangeLog 2019-04-08 14:45:08 UTC (rev 244019)
+++ trunk/Source/WebCore/ChangeLog 2019-04-08 15:51:19 UTC (rev 244020)
@@ -1,3 +1,16 @@
+2019-04-08 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r243943.
+
+ Caused test262 failures.
+
+ Reverted changeset:
+
+ "[JSC] Filter DontEnum properties in
+ ProxyObject::getOwnPropertyNames()"
+ https://bugs.webkit.org/show_bug.cgi?id=176810
+ https://trac.webkit.org/changeset/243943
+
2019-04-05 Sergio Villar Senin <[email protected]>
[GTK][WPE] outlook.live.com displays old-fashioned UI
Modified: trunk/Source/WebCore/bindings/js/JSDOMConvertRecord.h (244019 => 244020)
--- trunk/Source/WebCore/bindings/js/JSDOMConvertRecord.h 2019-04-08 14:45:08 UTC (rev 244019)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertRecord.h 2019-04-08 15:51:19 UTC (rev 244020)
@@ -86,7 +86,7 @@
// 4. Let keys be ? O.[[OwnPropertyKeys]]().
JSC::PropertyNameArray keys(&vm, JSC::PropertyNameMode::Strings, JSC::PrivateSymbolMode::Exclude);
- object->methodTable(vm)->getOwnPropertyNames(object, &state, keys, JSC::EnumerationMode(JSC::DontEnumPropertiesMode::Include));
+ object->methodTable(vm)->getOwnPropertyNames(object, &state, keys, JSC::EnumerationMode());
RETURN_IF_EXCEPTION(scope, { });
@@ -99,8 +99,9 @@
// 2. If desc is not undefined and desc.[[Enumerable]] is true:
- // It's necessary to filter enumerable here rather than using the default EnumerationMode,
- // to prevent an observable extra [[GetOwnProperty]] operation in the case of ProxyObject records.
+ // FIXME: Do we need to check for enumerable / undefined, or is this handled by the default
+ // enumeration mode?
+
if (didGetDescriptor && descriptor.enumerable()) {
// 1. Let typedKey be key converted to an IDL value of type K.
auto typedKey = Detail::IdentifierConverter<K>::convert(state, key);