WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-199138-20200505030413.patch (text/plain), 47.70 KB, created by
Alexey Shvayka
on 2020-05-04 17:04:15 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alexey Shvayka
Created:
2020-05-04 17:04:15 PDT
Size:
47.70 KB
patch
obsolete
>Index: JSTests/ChangeLog >=================================================================== >--- JSTests/ChangeLog (revision 261125) >+++ JSTests/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2020-05-04 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ Object.prototype.toString is not spec-perfect >+ https://bugs.webkit.org/show_bug.cgi?id=199138 >+ >+ Reviewed by Darin Adler and Keith Miller. >+ >+ * ChakraCore.yaml: Skip a test as `global` now has @@toStringTag. >+ * ChakraCore/test/LetConst/delete.baseline: Removed. >+ * stress/internal-promise-constructor-not-confusing.js: Use @isPromise. >+ * stress/object-get-own-property-symbols.js: Adjust test as `global` now has @@toStringTag. >+ * test262/expectations.yaml: Mark 6 test cases as passing. >+ > 2020-05-01 Yusuke Suzuki <ysuzuki@apple.com> > > Fix stress/big-int-negate-jit.js >Index: JSTests/ChakraCore.yaml >=================================================================== >--- JSTests/ChakraCore.yaml (revision 261125) >+++ JSTests/ChakraCore.yaml (working copy) >@@ -817,7 +817,8 @@ > - path: ChakraCore/test/LetConst/defer5.js > cmd: runChakra :baseline, "ReferenceError", "defer5.baseline-jsc", [] > - path: ChakraCore/test/LetConst/delete.js >- cmd: runChakra :baseline, "NoException", "delete.baseline", [] >+ # The test should use Reflect.ownKeys as `this` may have symbol properties. >+ cmd: runChakra :skipDueToOutdatedOrBadTest, "NoException", "", [] > - path: ChakraCore/test/LetConst/dop.js > cmd: runChakra :baseline, "NoException", "dop.baseline-jsc", [] > - path: ChakraCore/test/LetConst/dop1.js >Index: JSTests/ChakraCore/test/LetConst/delete.baseline >=================================================================== >--- JSTests/ChakraCore/test/LetConst/delete.baseline (revision 261125) >+++ JSTests/ChakraCore/test/LetConst/delete.baseline (nonexistent) >@@ -1,4 +0,0 @@ >-20 >-let x >-let x >-PASS > >Property changes on: JSTests/ChakraCore/test/LetConst/delete.baseline >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-LF >\ No newline at end of property >Index: JSTests/stress/internal-promise-constructor-not-confusing.js >=================================================================== >--- JSTests/stress/internal-promise-constructor-not-confusing.js (revision 261125) >+++ JSTests/stress/internal-promise-constructor-not-confusing.js (working copy) >@@ -7,19 +7,26 @@ var InternalPromise = $vm.createBuiltin( > return @InternalPromise; > })`)(); > >+var isPromise = $vm.createBuiltin(`(function (p) { >+ return @isPromise(p); >+})`); >+ > function DerivedPromise() { } > > for (var i = 0; i < 1e4; ++i) { > var promise = Reflect.construct(InternalPromise, [function (resolve) { resolve(42); }], DerivedPromise); >- shouldBe(promise.toString(), `[object InternalPromise]`); >+ shouldBe(promise.toString(), `[object Object]`); >+ shouldBe(isPromise(promise), true); > } > drainMicrotasks(); > for (var i = 0; i < 1e4; ++i) { > var promise = Reflect.construct(Promise, [function (resolve) { resolve(42); }], DerivedPromise); >- shouldBe(promise.toString(), `[object Promise]`); >+ shouldBe(promise.toString(), `[object Object]`); >+ shouldBe(isPromise(promise), true); > } > drainMicrotasks(); > for (var i = 0; i < 1e4; ++i) { > var promise = Reflect.construct(InternalPromise, [function (resolve) { resolve(42); }], DerivedPromise); >- shouldBe(promise.toString(), `[object InternalPromise]`); >+ shouldBe(promise.toString(), `[object Object]`); >+ shouldBe(isPromise(promise), true); > } >Index: JSTests/stress/object-get-own-property-symbols.js >=================================================================== >--- JSTests/stress/object-get-own-property-symbols.js (revision 261125) >+++ JSTests/stress/object-get-own-property-symbols.js (working copy) >@@ -3,8 +3,9 @@ > var global = (Function("return this")()); > > // private names for privileged code should not be exposed. >-if (Object.getOwnPropertySymbols(global).length !== 0) >- throw "Error: bad value " + Object.getOwnPropertySymbols(global).length; >+var globalSymbols = Object.getOwnPropertySymbols(global).filter(s => s !== Symbol.toStringTag); >+if (globalSymbols.length !== 0) >+ throw "Error: bad value " + globalSymbols.length; > > var object = {}; > var symbol = Symbol("Cocoa"); >Index: JSTests/test262/expectations.yaml >=================================================================== >--- JSTests/test262/expectations.yaml (revision 261125) >+++ JSTests/test262/expectations.yaml (working copy) >@@ -1030,15 +1030,6 @@ test/built-ins/Object/internals/DefineOw > test/built-ins/Object/keys/order-after-define-property.js: > default: 'Test262Error: Expected [b, a] and [a, b] to have the same contents. ' > strict mode: 'Test262Error: Expected [b, a] and [a, b] to have the same contents. ' >-test/built-ins/Object/prototype/toString/proxy-function.js: >- default: 'Test262Error: function proxy Expected SameValue(«[object Object]», «[object Function]») to be true' >- strict mode: 'Test262Error: function proxy Expected SameValue(«[object Object]», «[object Function]») to be true' >-test/built-ins/Object/prototype/toString/symbol-tag-non-str-builtin.js: >- default: 'Test262Error: Expected SameValue(«[object Math]», «[object Object]») to be true' >- strict mode: 'Test262Error: Expected SameValue(«[object Math]», «[object Object]») to be true' >-test/built-ins/Object/prototype/toString/symbol-tag-non-str-proxy-function.js: >- default: 'Test262Error: generator function proxy without Symbol.toStringTag Expected SameValue(«[object Object]», «[object Function]») to be true' >- strict mode: 'Test262Error: generator function proxy without Symbol.toStringTag Expected SameValue(«[object Object]», «[object Function]») to be true' > test/built-ins/Object/values/order-after-define-property.js: > default: 'Test262Error: Expected [b, a] and [a, b] to have the same contents. ' > strict mode: 'Test262Error: Expected [b, a] and [a, b] to have the same contents. ' >Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 261125) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,89 @@ >+2020-05-04 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ Object.prototype.toString is not spec-perfect >+ https://bugs.webkit.org/show_bug.cgi?id=199138 >+ >+ Reviewed by Darin Adler and Keith Miller. >+ >+ Before ES6, Object.prototype.toString relied only on internal [[Class]] slot. Starting with ES6, >+ Object.prototype.toString checks for a handful of internal slots, mimicing [[Class]], to ensure >+ backwards compatibility for pre-ES6 instances. Newly-added built-ins provide @@toStringTag for >+ the method to use. >+ >+ Before this change, Object.prototype.toString in JSC relied on className() a.k.a [[Class]] for >+ all instances. For (almost all) new built-ins, it was overriden by toStringName() returning >+ "Object", while @@toStringTag was set to correct value. This is quite an error-prone approach >+ and observable spec discrepancy if @@toStringTag is deleted or set to a non-string. >+ >+ This change eliminates the above-mentioned discrepancy and fixes Object.prototype.toString >+ to return "[object Function]" for callable Proxy objects, aligning JSC with the spec [1], V8, >+ and SpiderMonkey. >+ >+ For Object.prototype.toString to work through DebuggerScope and JSProxy, we perform all checks >+ in JSObject::toStringName(). Given that isArray() may throw a TypeError [2], we invoke >+ toStringName() before @@toStringTag lookup to accomodate revoked Proxy case. >+ >+ Also, this patch defines @@toStringTag for WebAssembly namespace object (to match Chrome), >+ JSC shell, and ConsoleObject. >+ >+ [1]: https://tc39.es/ecma262/#sec-object.prototype.tostring >+ [2]: https://tc39.es/ecma262/#sec-isarray (step 3.a) >+ >+ * jsc.cpp: >+ * runtime/BigIntObject.cpp: >+ (JSC::BigIntObject::toStringName): Deleted. >+ * runtime/BigIntObject.h: >+ * runtime/BooleanObject.cpp: >+ (JSC::BooleanObject::toStringName): >+ * runtime/BooleanObject.h: >+ * runtime/ConsoleObject.cpp: >+ (JSC::ConsoleObject::finishCreation): >+ * runtime/DateInstance.cpp: >+ (JSC::DateInstance::toStringName): >+ * runtime/DateInstance.h: >+ * runtime/ErrorInstance.cpp: >+ (JSC::ErrorInstance::toStringName): >+ * runtime/ErrorInstance.h: >+ * runtime/JSArrayBufferView.cpp: >+ (JSC::JSArrayBufferView::toStringName): Deleted. >+ * runtime/JSArrayBufferView.h: >+ * runtime/JSMap.cpp: >+ (JSC::JSMap::toStringName): Deleted. >+ * runtime/JSMap.h: >+ * runtime/JSObject.cpp: >+ (JSC::JSObject::toStringName): >+ * runtime/JSSet.cpp: >+ (JSC::JSSet::toStringName): Deleted. >+ * runtime/JSSet.h: >+ * runtime/JSWeakMap.cpp: >+ (JSC::JSWeakMap::toStringName): Deleted. >+ * runtime/JSWeakMap.h: >+ * runtime/JSWeakObjectRef.cpp: >+ (JSC::JSWeakObjectRef::toStringName): Deleted. >+ * runtime/JSWeakObjectRef.h: >+ * runtime/JSWeakSet.cpp: >+ (JSC::JSWeakSet::toStringName): Deleted. >+ * runtime/JSWeakSet.h: >+ * runtime/NumberObject.cpp: >+ (JSC::NumberObject::toStringName): >+ * runtime/NumberObject.h: >+ * runtime/ObjectPrototype.cpp: >+ (JSC::objectProtoFuncToString): >+ * runtime/ProxyObject.cpp: >+ (JSC::ProxyObject::toStringName): Deleted. >+ * runtime/ProxyObject.h: >+ * runtime/RegExpObject.cpp: >+ (JSC::RegExpObject::toStringName): >+ * runtime/RegExpObject.h: >+ * runtime/StringObject.cpp: >+ (JSC::StringObject::toStringName): >+ * runtime/StringObject.h: >+ * runtime/SymbolObject.cpp: >+ (JSC::SymbolObject::toStringName): Deleted. >+ * runtime/SymbolObject.h: >+ * wasm/js/JSWebAssembly.cpp: >+ (JSC::JSWebAssembly::finishCreation): >+ > 2020-05-04 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] Add @@toStringTag to WebAssembly.Global >Index: Source/JavaScriptCore/jsc.cpp >=================================================================== >--- Source/JavaScriptCore/jsc.cpp (revision 261125) >+++ Source/JavaScriptCore/jsc.cpp (working copy) >@@ -494,6 +494,7 @@ private: > void finishCreation(VM& vm, const Vector<String>& arguments) > { > Base::finishCreation(vm); >+ JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); > > addFunction(vm, "debug", functionDebug, 1); > addFunction(vm, "describe", functionDescribe, 1); >Index: Source/JavaScriptCore/runtime/BigIntObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/BigIntObject.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/BigIntObject.cpp (working copy) >@@ -56,11 +56,6 @@ void BigIntObject::finishCreation(VM& vm > setInternalValue(vm, bigInt); > } > >-String BigIntObject::toStringName(const JSObject*, JSGlobalObject*) >-{ >- return "Object"_s; >-} >- > JSValue BigIntObject::defaultValue(const JSObject* object, JSGlobalObject*, PreferredPrimitiveType) > { > const BigIntObject* bigIntObject = jsCast<const BigIntObject*>(object); >Index: Source/JavaScriptCore/runtime/BigIntObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/BigIntObject.h (revision 261125) >+++ Source/JavaScriptCore/runtime/BigIntObject.h (working copy) >@@ -53,8 +53,6 @@ public: > > static JSValue defaultValue(const JSObject*, JSGlobalObject*, PreferredPrimitiveType); > >- static String toStringName(const JSObject*, JSGlobalObject*); >- > private: > JS_EXPORT_PRIVATE void finishCreation(VM&, JSValue); > JS_EXPORT_PRIVATE BigIntObject(VM&, Structure*); >Index: Source/JavaScriptCore/runtime/BooleanObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/BooleanObject.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/BooleanObject.cpp (working copy) >@@ -41,4 +41,9 @@ void BooleanObject::finishCreation(VM& v > ASSERT(inherits(vm, info())); > } > >+String BooleanObject::toStringName(const JSObject*, JSGlobalObject*) >+{ >+ return "Boolean"_s; >+} >+ > } // namespace JSC >Index: Source/JavaScriptCore/runtime/BooleanObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/BooleanObject.h (revision 261125) >+++ Source/JavaScriptCore/runtime/BooleanObject.h (working copy) >@@ -51,6 +51,8 @@ public: > { > return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); > } >+ >+ static String toStringName(const JSObject*, JSGlobalObject*); > }; > static_assert(sizeof(BooleanObject) == sizeof(JSWrapperObject)); > >Index: Source/JavaScriptCore/runtime/ConsoleObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/ConsoleObject.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/ConsoleObject.cpp (working copy) >@@ -117,6 +117,8 @@ void ConsoleObject::finishCreation(VM& v > JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("record", consoleProtoFuncRecord, static_cast<unsigned>(PropertyAttribute::None), 0); > JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("recordEnd", consoleProtoFuncRecordEnd, static_cast<unsigned>(PropertyAttribute::None), 0); > JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("screenshot", consoleProtoFuncScreenshot, static_cast<unsigned>(PropertyAttribute::None), 0); >+ >+ JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); > } > > static String valueToStringWithUndefinedOrNullCheck(JSGlobalObject* globalObject, JSValue value) >Index: Source/JavaScriptCore/runtime/DateInstance.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/DateInstance.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/DateInstance.cpp (working copy) >@@ -50,6 +50,11 @@ void DateInstance::finishCreation(VM& vm > m_internalNumber = timeClip(time); > } > >+String DateInstance::toStringName(const JSObject*, JSGlobalObject*) >+{ >+ return "Date"_s; >+} >+ > const GregorianDateTime* DateInstance::calculateGregorianDateTime(VM& vm) const > { > double milli = internalNumber(); >Index: Source/JavaScriptCore/runtime/DateInstance.h >=================================================================== >--- Source/JavaScriptCore/runtime/DateInstance.h (revision 261125) >+++ Source/JavaScriptCore/runtime/DateInstance.h (working copy) >@@ -54,6 +54,7 @@ public: > return instance; > } > >+ static String toStringName(const JSObject*, JSGlobalObject*); > double internalNumber() const { return m_internalNumber; } > void setInternalNumber(double value) { m_internalNumber = value; } > >Index: Source/JavaScriptCore/runtime/ErrorInstance.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/ErrorInstance.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/ErrorInstance.cpp (working copy) >@@ -311,4 +311,9 @@ bool ErrorInstance::deleteProperty(JSCel > return Base::deleteProperty(thisObject, globalObject, propertyName, slot); > } > >+String ErrorInstance::toStringName(const JSObject*, JSGlobalObject*) >+{ >+ return "Error"_s; >+} >+ > } // namespace JSC >Index: Source/JavaScriptCore/runtime/ErrorInstance.h >=================================================================== >--- Source/JavaScriptCore/runtime/ErrorInstance.h (revision 261125) >+++ Source/JavaScriptCore/runtime/ErrorInstance.h (working copy) >@@ -98,6 +98,7 @@ protected: > static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); > static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); >+ static String toStringName(const JSObject*, JSGlobalObject*); > > void computeErrorInfo(VM&); > >Index: Source/JavaScriptCore/runtime/JSArrayBufferView.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSArrayBufferView.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/JSArrayBufferView.cpp (working copy) >@@ -42,11 +42,6 @@ const ClassInfo JSArrayBufferView::s_inf > "ArrayBufferView", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSArrayBufferView) > }; > >-String JSArrayBufferView::toStringName(const JSObject*, JSGlobalObject*) >-{ >- return "Object"_s; >-} >- > JSArrayBufferView::ConstructionContext::ConstructionContext( > Structure* structure, uint32_t length, void* vector) > : m_structure(structure) >Index: Source/JavaScriptCore/runtime/JSArrayBufferView.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSArrayBufferView.h (revision 261125) >+++ Source/JavaScriptCore/runtime/JSArrayBufferView.h (working copy) >@@ -212,8 +212,6 @@ protected: > > ArrayBuffer* existingBufferInButterfly(); > >- static String toStringName(const JSObject*, JSGlobalObject*); >- > VectorPtr m_vector; > uint32_t m_length; > TypedArrayMode m_mode; >Index: Source/JavaScriptCore/runtime/JSMap.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSMap.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/JSMap.cpp (working copy) >@@ -33,11 +33,6 @@ namespace JSC { > > const ClassInfo JSMap::s_info = { "Map", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSMap) }; > >-String JSMap::toStringName(const JSObject*, JSGlobalObject*) >-{ >- return "Object"_s; >-} >- > JSMap* JSMap::clone(JSGlobalObject* globalObject, VM& vm, Structure* structure) > { > JSMap* instance = new (NotNull, allocateCell<JSMap>(vm.heap)) JSMap(vm, structure); >Index: Source/JavaScriptCore/runtime/JSMap.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSMap.h (revision 261125) >+++ Source/JavaScriptCore/runtime/JSMap.h (working copy) >@@ -68,8 +68,6 @@ private: > : Base(vm, structure) > { > } >- >- static String toStringName(const JSObject*, JSGlobalObject*); > }; > > static_assert(std::is_final<JSMap>::value, "Required for JSType based casting"); >Index: Source/JavaScriptCore/runtime/JSObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSObject.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/JSObject.cpp (working copy) >@@ -24,6 +24,7 @@ > #include "config.h" > #include "JSObject.h" > >+#include "ArrayConstructor.h" > #include "ButterflyInlines.h" > #include "CatchScope.h" > #include "CustomGetterSetter.h" >@@ -519,9 +520,16 @@ String JSObject::className(const JSObjec > String JSObject::toStringName(const JSObject* object, JSGlobalObject* globalObject) > { > VM& vm = globalObject->vm(); >- const ClassInfo* info = object->classInfo(vm); >- ASSERT(info); >- return info->className; >+ auto scope = DECLARE_THROW_SCOPE(vm); >+ bool objectIsArray = isArray(globalObject, object); >+ RETURN_IF_EXCEPTION(scope, String()); >+ if (objectIsArray) >+ return "Array"_s; >+ if (TypeInfo::isArgumentsType(object->type())) >+ return "Arguments"_s; >+ if (const_cast<JSObject*>(object)->isCallable(vm)) >+ return "Function"_s; >+ return "Object"_s; > } > > String JSObject::calculatedClassName(JSObject* object) >Index: Source/JavaScriptCore/runtime/JSSet.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSSet.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/JSSet.cpp (working copy) >@@ -33,11 +33,6 @@ namespace JSC { > > const ClassInfo JSSet::s_info = { "Set", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSet) }; > >-String JSSet::toStringName(const JSObject*, JSGlobalObject*) >-{ >- return "Object"_s; >-} >- > JSSet* JSSet::clone(JSGlobalObject* globalObject, VM& vm, Structure* structure) > { > JSSet* instance = new (NotNull, allocateCell<JSSet>(vm.heap)) JSSet(vm, structure); >Index: Source/JavaScriptCore/runtime/JSSet.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSSet.h (revision 261125) >+++ Source/JavaScriptCore/runtime/JSSet.h (working copy) >@@ -73,8 +73,6 @@ private: > : Base(vm, structure, sizeHint) > { > } >- >- static String toStringName(const JSObject*, JSGlobalObject*); > }; > > static_assert(std::is_final<JSSet>::value, "Required for JSType based casting"); >Index: Source/JavaScriptCore/runtime/JSWeakMap.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSWeakMap.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/JSWeakMap.cpp (working copy) >@@ -32,9 +32,4 @@ namespace JSC { > > const ClassInfo JSWeakMap::s_info = { "WeakMap", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSWeakMap) }; > >-String JSWeakMap::toStringName(const JSObject*, JSGlobalObject*) >-{ >- return "Object"_s; >-} >- > } >Index: Source/JavaScriptCore/runtime/JSWeakMap.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSWeakMap.h (revision 261125) >+++ Source/JavaScriptCore/runtime/JSWeakMap.h (working copy) >@@ -58,8 +58,6 @@ private: > : Base(vm, structure) > { > } >- >- static String toStringName(const JSObject*, JSGlobalObject*); > }; > > static_assert(std::is_final<JSWeakMap>::value, "Required for JSType based casting"); >Index: Source/JavaScriptCore/runtime/JSWeakObjectRef.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSWeakObjectRef.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/JSWeakObjectRef.cpp (working copy) >@@ -57,10 +57,5 @@ void JSWeakObjectRef::finalizeUnconditio > m_value.clear(); > } > >-String JSWeakObjectRef::toStringName(const JSC::JSObject*, JSGlobalObject*) >-{ >- return "Object"_s; >-} >- > } > >Index: Source/JavaScriptCore/runtime/JSWeakObjectRef.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSWeakObjectRef.h (revision 261125) >+++ Source/JavaScriptCore/runtime/JSWeakObjectRef.h (working copy) >@@ -75,8 +75,6 @@ private: > > JS_EXPORT_PRIVATE void finishCreation(VM&, JSObject* value); > >- static String toStringName(const JSObject*, JSGlobalObject*); >- > uintptr_t m_lastAccessVersion; > WriteBarrier<JSObject> m_value; > }; >Index: Source/JavaScriptCore/runtime/JSWeakSet.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSWeakSet.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/JSWeakSet.cpp (working copy) >@@ -32,9 +32,4 @@ namespace JSC { > > const ClassInfo JSWeakSet::s_info = { "WeakSet", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSWeakSet) }; > >-String JSWeakSet::toStringName(const JSC::JSObject*, JSGlobalObject*) >-{ >- return "Object"_s; >-} >- > } >Index: Source/JavaScriptCore/runtime/JSWeakSet.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSWeakSet.h (revision 261125) >+++ Source/JavaScriptCore/runtime/JSWeakSet.h (working copy) >@@ -53,8 +53,6 @@ private: > : Base(vm, structure) > { > } >- >- static String toStringName(const JSObject*, JSGlobalObject*); > }; > > static_assert(std::is_final<JSWeakSet>::value, "Required for JSType based casting"); >Index: Source/JavaScriptCore/runtime/NumberObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/NumberObject.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/NumberObject.cpp (working copy) >@@ -44,6 +44,11 @@ void NumberObject::finishCreation(VM& vm > ASSERT(type() == NumberObjectType); > } > >+String NumberObject::toStringName(const JSObject*, JSGlobalObject*) >+{ >+ return "Number"_s; >+} >+ > NumberObject* constructNumber(JSGlobalObject* globalObject, JSValue number) > { > NumberObject* object = NumberObject::create(globalObject->vm(), globalObject->numberObjectStructure()); >Index: Source/JavaScriptCore/runtime/NumberObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/NumberObject.h (revision 261125) >+++ Source/JavaScriptCore/runtime/NumberObject.h (working copy) >@@ -51,6 +51,8 @@ public: > { > return Structure::create(vm, globalObject, prototype, TypeInfo(NumberObjectType, StructureFlags), info()); > } >+ >+ static String toStringName(const JSObject*, JSGlobalObject*); > }; > static_assert(sizeof(NumberObject) == sizeof(JSWrapperObject)); > >Index: Source/JavaScriptCore/runtime/ObjectPrototype.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/ObjectPrototype.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/ObjectPrototype.cpp (working copy) >@@ -325,29 +325,29 @@ EncodedJSValue JSC_HOST_CALL objectProto > if (result) > return JSValue::encode(result); > >- PropertyName toStringTagSymbol = vm.propertyNames->toStringTagSymbol; >- RELEASE_AND_RETURN(scope, JSValue::encode(thisObject->getPropertySlot(globalObject, toStringTagSymbol, [&] (bool found, PropertySlot& toStringTagSlot) -> JSValue { >- if (found) { >- JSValue stringTag = toStringTagSlot.getValue(globalObject, toStringTagSymbol); >- RETURN_IF_EXCEPTION(scope, { }); >- if (stringTag.isString()) { >- JSString* result = jsString(globalObject, vm.smallStrings.objectStringStart(), asString(stringTag), vm.smallStrings.singleCharacterString(']')); >- RETURN_IF_EXCEPTION(scope, { }); >- thisObject->structure(vm)->setObjectToStringValue(globalObject, vm, result, toStringTagSlot); >- return result; >- } >- } >+ String tag = thisObject->methodTable(vm)->toStringName(thisObject, globalObject); >+ RETURN_IF_EXCEPTION(scope, { }); >+ JSString* jsTag = nullptr; > >- String tag = thisObject->methodTable(vm)->toStringName(thisObject, globalObject); >+ PropertySlot slot(thisObject, PropertySlot::InternalMethodType::Get); >+ bool hasProperty = thisObject->getPropertySlot(globalObject, vm.propertyNames->toStringTagSymbol, slot); >+ EXCEPTION_ASSERT(!scope.exception() || !hasProperty); >+ if (hasProperty) { >+ JSValue tagValue = slot.getValue(globalObject, vm.propertyNames->toStringTagSymbol); > RETURN_IF_EXCEPTION(scope, { }); >- String newString = tryMakeString("[object ", WTFMove(tag), "]"); >- if (!newString) >- return throwOutOfMemoryError(globalObject, scope); >+ if (tagValue.isString()) >+ jsTag = asString(tagValue); >+ } > >- auto result = jsNontrivialString(vm, newString); >- thisObject->structure(vm)->setObjectToStringValue(globalObject, vm, result, toStringTagSlot); >- return result; >- }))); >+ if (!jsTag) { >+ ASSERT_WITH_MESSAGE(tag.length() > 1, "toStringName() should return strings two or more characters long."); >+ jsTag = jsNontrivialString(vm, WTFMove(tag)); >+ } >+ >+ JSString* jsResult = jsString(globalObject, vm.smallStrings.objectStringStart(), jsTag, vm.smallStrings.singleCharacterString(']')); >+ RETURN_IF_EXCEPTION(scope, { }); >+ thisObject->structure(vm)->setObjectToStringValue(globalObject, vm, jsResult, slot); >+ return JSValue::encode(jsResult); > } > > } // namespace JSC >Index: Source/JavaScriptCore/runtime/ProxyObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/ProxyObject.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/ProxyObject.cpp (working copy) >@@ -51,24 +51,6 @@ ProxyObject::ProxyObject(VM& vm, Structu > { > } > >-String ProxyObject::toStringName(const JSObject* object, JSGlobalObject* globalObject) >-{ >- VM& vm = globalObject->vm(); >- auto scope = DECLARE_THROW_SCOPE(vm); >- const ProxyObject* proxy = jsCast<const ProxyObject*>(object); >- while (proxy) { >- const JSObject* target = proxy->target(); >- bool targetIsArray = isArray(globalObject, target); >- if (UNLIKELY(scope.exception())) >- break; >- if (targetIsArray) >- RELEASE_AND_RETURN(scope, target->classInfo(vm)->methodTable.toStringName(target, globalObject)); >- >- proxy = jsDynamicCast<const ProxyObject*>(vm, target); >- } >- return "Object"_s; >-} >- > Structure* ProxyObject::structureForTarget(JSGlobalObject* globalObject, JSValue target) > { > VM& vm = globalObject->vm(); >Index: Source/JavaScriptCore/runtime/ProxyObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/ProxyObject.h (revision 261125) >+++ Source/JavaScriptCore/runtime/ProxyObject.h (working copy) >@@ -80,7 +80,6 @@ private: > JS_EXPORT_PRIVATE void finishCreation(VM&, JSGlobalObject*, JSValue target, JSValue handler); > JS_EXPORT_PRIVATE static Structure* structureForTarget(JSGlobalObject*, JSValue target); > >- static String toStringName(const JSObject*, JSGlobalObject*); > static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); > static bool getOwnPropertySlotByIndex(JSObject*, JSGlobalObject*, unsigned propertyName, PropertySlot&); > static CallData getCallData(JSCell*); >Index: Source/JavaScriptCore/runtime/RegExpObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/RegExpObject.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/RegExpObject.cpp (working copy) >@@ -167,6 +167,11 @@ bool RegExpObject::put(JSCell* cell, JSG > return Base::put(cell, globalObject, propertyName, value, slot); > } > >+String RegExpObject::toStringName(const JSObject*, JSGlobalObject*) >+{ >+ return "RegExp"_s; >+} >+ > JSValue RegExpObject::exec(JSGlobalObject* globalObject, JSString* string) > { > return execInline(globalObject, string); >Index: Source/JavaScriptCore/runtime/RegExpObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/RegExpObject.h (revision 261125) >+++ Source/JavaScriptCore/runtime/RegExpObject.h (working copy) >@@ -104,6 +104,7 @@ public: > > static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); >+ static String toStringName(const JSObject*, JSGlobalObject*); > > DECLARE_EXPORT_INFO; > >Index: Source/JavaScriptCore/runtime/StringObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/StringObject.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/StringObject.cpp (working copy) >@@ -166,6 +166,11 @@ void StringObject::getOwnNonIndexPropert > return JSObject::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNames, mode); > } > >+String StringObject::toStringName(const JSObject*, JSGlobalObject*) >+{ >+ return "String"_s; >+} >+ > StringObject* constructString(VM& vm, JSGlobalObject* globalObject, JSValue string) > { > StringObject* object = StringObject::create(vm, globalObject->stringObjectStructure()); >Index: Source/JavaScriptCore/runtime/StringObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/StringObject.h (revision 261125) >+++ Source/JavaScriptCore/runtime/StringObject.h (working copy) >@@ -62,6 +62,7 @@ public: > JS_EXPORT_PRIVATE static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); > JS_EXPORT_PRIVATE static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); > JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); >+ static String toStringName(const JSObject*, JSGlobalObject*); > > DECLARE_EXPORT_INFO; > >Index: Source/JavaScriptCore/runtime/SymbolObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/SymbolObject.cpp (revision 261125) >+++ Source/JavaScriptCore/runtime/SymbolObject.cpp (working copy) >@@ -47,11 +47,6 @@ void SymbolObject::finishCreation(VM& vm > setInternalValue(vm, symbol); > } > >-String SymbolObject::toStringName(const JSObject*, JSGlobalObject*) >-{ >- return "Object"_s; >-} >- > JSValue SymbolObject::defaultValue(const JSObject* object, JSGlobalObject*, PreferredPrimitiveType) > { > const SymbolObject* symbolObject = jsCast<const SymbolObject*>(object); >Index: Source/JavaScriptCore/runtime/SymbolObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/SymbolObject.h (revision 261125) >+++ Source/JavaScriptCore/runtime/SymbolObject.h (working copy) >@@ -62,8 +62,6 @@ public: > > static JSValue defaultValue(const JSObject*, JSGlobalObject*, PreferredPrimitiveType); > >- static String toStringName(const JSObject*, JSGlobalObject*); >- > private: > JS_EXPORT_PRIVATE void finishCreation(VM&, Symbol*); > JS_EXPORT_PRIVATE SymbolObject(VM&, Structure*); >Index: Source/JavaScriptCore/wasm/js/JSWebAssembly.cpp >=================================================================== >--- Source/JavaScriptCore/wasm/js/JSWebAssembly.cpp (revision 261125) >+++ Source/JavaScriptCore/wasm/js/JSWebAssembly.cpp (working copy) >@@ -114,6 +114,7 @@ void JSWebAssembly::finishCreation(VM& v > { > Base::finishCreation(vm); > ASSERT(inherits(vm, info())); >+ JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); > if (Options::useWebAssemblyStreamingApi()) { > JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("compileStreaming", webAssemblyCompileStreamingCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); > JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("instantiateStreaming", webAssemblyInstantiateStreamingCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); >Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 261125) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,31 @@ >+2020-05-04 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ Object.prototype.toString is not spec-perfect >+ https://bugs.webkit.org/show_bug.cgi?id=199138 >+ >+ Reviewed by Darin Adler and Keith Miller. >+ >+ This patch defines @@toStringTag symbols for all WebIDL prototypes, including >+ interfaces that are not exposed, as required by the spec [1]. >+ >+ With updated JSObject::toStringName() and @@toStringTag symbols added in r260992, >+ className() and toStringName() methods of JSDOMConstructorBase can be safely removed. >+ >+ [1]: https://heycam.github.io/webidl/#dfn-class-string >+ >+ Tests: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any.js >+ imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-iterator-prototype-object.any.js >+ >+ * bindings/js/JSDOMConstructorBase.cpp: >+ (WebCore::JSDOMConstructorBase::className): Deleted. >+ (WebCore::JSDOMConstructorBase::toStringName): Deleted. >+ * bindings/js/JSDOMConstructorBase.h: >+ * bindings/scripts/CodeGeneratorJS.pm: >+ (GenerateImplementation): >+ (GeneratePrototypeDeclaration): >+ * bindings/scripts/test/JS/JSTestGlobalObject.cpp: >+ (WebCore::JSTestGlobalObjectPrototype::finishCreation): >+ > 2020-05-04 Jiewen Tan <jiewen_tan@apple.com> > > [WebAuthn] Implement +[_WKWebAuthenticationPanel clearAllLocalAuthenticatorCredentials] >Index: Source/WebCore/bindings/js/JSDOMConstructorBase.cpp >=================================================================== >--- Source/WebCore/bindings/js/JSDOMConstructorBase.cpp (revision 261125) >+++ Source/WebCore/bindings/js/JSDOMConstructorBase.cpp (working copy) >@@ -46,19 +46,6 @@ CallData JSDOMConstructorBase::getCallDa > return callData; > } > >-String JSDOMConstructorBase::className(const JSObject*, JSC::VM&) >-{ >- return "Function"_s; >-} >- >-String JSDOMConstructorBase::toStringName(const JSObject* object, JSC::JSGlobalObject* lexicalGlobalObject) >-{ >- VM& vm = lexicalGlobalObject->vm(); >- const ClassInfo* info = object->classInfo(vm); >- ASSERT(info); >- return info->methodTable.className(object, vm); >-} >- > JSC::IsoSubspace* JSDOMConstructorBase::subspaceForImpl(JSC::VM& vm) > { > return &static_cast<JSVMClientData*>(vm.clientData)->domConstructorSpace(); >Index: Source/WebCore/bindings/js/JSDOMConstructorBase.h >=================================================================== >--- Source/WebCore/bindings/js/JSDOMConstructorBase.h (revision 261125) >+++ Source/WebCore/bindings/js/JSDOMConstructorBase.h (working copy) >@@ -49,8 +49,6 @@ protected: > { > } > >- static String className(const JSObject*, JSC::VM&); >- static String toStringName(const JSObject*, JSC::JSGlobalObject*); > static JSC::CallData getCallData(JSC::JSCell*); > }; > >Index: Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >=================================================================== >--- Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (revision 261125) >+++ Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (working copy) >@@ -4301,11 +4301,12 @@ sub GenerateImplementation > my $hashTable = $justGenerateValueArray ? "nullptr" : "&${className}PrototypeTable"; > push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleInterfaceName}\", &Base::s_info, ${hashTable}, nullptr, CREATE_METHOD_TABLE(${className}Prototype) };\n\n"); > >- if (PrototypeHasStaticPropertyTable($interface) || IsGlobalInterface($interface)) { >- push(@implContent, "void ${className}Prototype::finishCreation(VM& vm)\n"); >- push(@implContent, "{\n"); >- push(@implContent, " Base::finishCreation(vm);\n"); >- push(@implContent, " reifyStaticProperties(vm, ${className}::info(), ${className}PrototypeTableValues, *this);\n") if !IsGlobalInterface($interface); >+ push(@implContent, "void ${className}Prototype::finishCreation(VM& vm)\n"); >+ push(@implContent, "{\n"); >+ push(@implContent, " Base::finishCreation(vm);\n"); >+ >+ if (PrototypeHasStaticPropertyTable($interface) && !IsGlobalInterface($interface)) { >+ push(@implContent, " reifyStaticProperties(vm, ${className}::info(), ${className}PrototypeTableValues, *this);\n"); > > my @runtimeEnabledProperties = @runtimeEnabledOperations; > push(@runtimeEnabledProperties, @runtimeEnabledAttributes); >@@ -4374,12 +4375,12 @@ sub GenerateImplementation > push(@implContent, " addValueIterableMethods(*globalObject(), *this);\n") if $interface->iterable and !IsKeyValueIterableInterface($interface); > > addUnscopableProperties($interface); >- >- assert("JSC_TO_STRING_TAG_WITHOUT_TRANSITION() requires strings two or more characters long") if length($visibleInterfaceName) < 2; >- push(@implContent, " JSC_TO_STRING_TAG_WITHOUT_TRANSITION();\n"); >- push(@implContent, "}\n\n"); > } > >+ assert("JSC_TO_STRING_TAG_WITHOUT_TRANSITION() requires strings two or more characters long") if length($visibleInterfaceName) < 2; >+ push(@implContent, " JSC_TO_STRING_TAG_WITHOUT_TRANSITION();\n"); >+ push(@implContent, "}\n\n"); >+ > # - Initialize static ClassInfo object > push(@implContent, "const ClassInfo $className" . "::s_info = { \"${visibleInterfaceName}\", &Base::s_info, "); > >@@ -7339,12 +7340,8 @@ sub GeneratePrototypeDeclaration > push(@$outputArray, " {\n"); > push(@$outputArray, " }\n"); > >- if (PrototypeHasStaticPropertyTable($interface) || IsGlobalInterface($interface)) { >- $structureFlags{"JSC::HasStaticPropertyTable"} = 1 if IsGlobalInterface($interface); >- >- push(@$outputArray, "\n"); >- push(@$outputArray, " void finishCreation(JSC::VM&);\n"); >- } >+ push(@$outputArray, "\n"); >+ push(@$outputArray, " void finishCreation(JSC::VM&);\n"); > > # FIXME: Should this override putByIndex as well? > if ($interface->extendedAttributes->{CustomPutOnPrototype}) { >@@ -7357,6 +7354,7 @@ sub GeneratePrototypeDeclaration > push(@$outputArray, " static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow);\n"); > } > >+ $structureFlags{"JSC::HasStaticPropertyTable"} = 1 if PrototypeHasStaticPropertyTable($interface) && IsGlobalInterface($interface); > $structureFlags{"JSC::IsImmutablePrototypeExoticObject"} = 1 if $interface->extendedAttributes->{IsImmutablePrototypeExoticObjectOnPrototype}; > > # structure flags >Index: Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (revision 261125) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (working copy) >@@ -700,9 +700,6 @@ const ClassInfo JSTestGlobalObjectProtot > void JSTestGlobalObjectPrototype::finishCreation(VM& vm) > { > Base::finishCreation(vm); >-#if ENABLE(TEST_FEATURE) >- putDirect(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames().testPrivateFunctionPrivateName(), JSFunction::create(vm, globalObject(), 0, String(), jsTestGlobalObjectInstanceFunctionTestPrivateFunction), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >-#endif > JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); > } > >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 261125) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,12 @@ >+2020-05-04 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ Object.prototype.toString is not spec-perfect >+ https://bugs.webkit.org/show_bug.cgi?id=199138 >+ >+ Reviewed by Darin Adler and Keith Miller. >+ >+ * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: >+ > 2020-05-04 Darin Adler <darin@apple.com> > > Remove unneeded USE(MEDIAREMOTE) >Index: Tools/TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp (revision 261125) >+++ Tools/TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp (working copy) >@@ -671,7 +671,7 @@ static void testJSCEvaluateInObject() > g_assert_true(JSC_IS_VALUE(module.get())); > g_assert_true(jsc_value_is_object(module.get())); > GUniquePtr<char> valueString(jsc_value_to_string(module.get())); >- g_assert_cmpstr(valueString.get(), ==, "[object GlobalObject]"); >+ g_assert_cmpstr(valueString.get(), ==, "[object Object]"); > jsc_context_set_value(context.get(), "module", module.get()); > > GRefPtr<JSCValue> bar = adoptGRef(jsc_value_object_get_property(module.get(), "bar")); >Index: LayoutTests/imported/w3c/ChangeLog >=================================================================== >--- LayoutTests/imported/w3c/ChangeLog (revision 261125) >+++ LayoutTests/imported/w3c/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2020-05-04 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ Object.prototype.toString is not spec-perfect >+ https://bugs.webkit.org/show_bug.cgi?id=199138 >+ >+ Reviewed by Darin Adler and Keith Miller. >+ >+ * web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any-expected.txt: >+ * web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any.worker-expected.txt: >+ * web-platform-tests/WebIDL/ecmascript-binding/class-string-iterator-prototype-object.any-expected.txt: >+ * web-platform-tests/WebIDL/ecmascript-binding/class-string-iterator-prototype-object.any.worker-expected.txt: >+ > 2020-05-04 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] Add @@toStringTag to WebAssembly.Global >Index: LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any-expected.txt >=================================================================== >--- LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any-expected.txt (revision 261125) >+++ LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any-expected.txt (working copy) >@@ -5,6 +5,6 @@ PASS Object.prototype.toString applied t > PASS Object.prototype.toString applied to an instance > PASS Object.prototype.toString applied after modifying the prototype's @@toStringTag > PASS Object.prototype.toString applied to the instance after modifying the instance's @@toStringTag >-FAIL Object.prototype.toString applied to a null-prototype instance assert_equals: expected "[object Object]" but got "[object Blob]" >-FAIL Object.prototype.toString applied after deleting @@toStringTag assert_equals: prototype expected "[object Object]" but got "[object Blob]" >+PASS Object.prototype.toString applied to a null-prototype instance >+PASS Object.prototype.toString applied after deleting @@toStringTag > >Index: LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any.worker-expected.txt >=================================================================== >--- LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any.worker-expected.txt (revision 261125) >+++ LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any.worker-expected.txt (working copy) >@@ -5,6 +5,6 @@ PASS Object.prototype.toString applied t > PASS Object.prototype.toString applied to an instance > PASS Object.prototype.toString applied after modifying the prototype's @@toStringTag > PASS Object.prototype.toString applied to the instance after modifying the instance's @@toStringTag >-FAIL Object.prototype.toString applied to a null-prototype instance assert_equals: expected "[object Object]" but got "[object Blob]" >-FAIL Object.prototype.toString applied after deleting @@toStringTag assert_equals: prototype expected "[object Object]" but got "[object Blob]" >+PASS Object.prototype.toString applied to a null-prototype instance >+PASS Object.prototype.toString applied after deleting @@toStringTag > >Index: LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-iterator-prototype-object.any-expected.txt >=================================================================== >--- LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-iterator-prototype-object.any-expected.txt (revision 261125) >+++ LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-iterator-prototype-object.any-expected.txt (working copy) >@@ -3,5 +3,5 @@ PASS @@toStringTag exists with the appro > PASS Object.prototype.toString > PASS Object.prototype.toString applied after modifying @@toStringTag > FAIL Object.prototype.toString applied after nulling the prototype assert_equals: expected "[object Object]" but got "[object URLSearchParams Iterator]" >-FAIL Object.prototype.toString applied after deleting @@toStringTag assert_equals: prototype expected "[object Object]" but got "[object URLSearchParams Iterator]" >+PASS Object.prototype.toString applied after deleting @@toStringTag > >Index: LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-iterator-prototype-object.any.worker-expected.txt >=================================================================== >--- LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-iterator-prototype-object.any.worker-expected.txt (revision 261125) >+++ LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-iterator-prototype-object.any.worker-expected.txt (working copy) >@@ -3,5 +3,5 @@ PASS @@toStringTag exists with the appro > PASS Object.prototype.toString > PASS Object.prototype.toString applied after modifying @@toStringTag > FAIL Object.prototype.toString applied after nulling the prototype assert_equals: expected "[object Object]" but got "[object URLSearchParams Iterator]" >-FAIL Object.prototype.toString applied after deleting @@toStringTag assert_equals: prototype expected "[object Object]" but got "[object URLSearchParams Iterator]" >+PASS Object.prototype.toString applied after deleting @@toStringTag >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199138
:
372719
|
372722
|
372723
|
372725
|
372726
|
372748
|
372771
|
374400
|
374407
|
398257
|
398293
| 398436