Changeset 205023 in webkit
- Timestamp:
- Aug 26, 2016 10:05:21 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/test262.yaml
r204851 r205023 19481 19481 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict] 19482 19482 - path: test262/test/built-ins/JSON/stringify/value-proxy.js 19483 cmd: runTest262 : fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []19483 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [] 19484 19484 - path: test262/test/built-ins/JSON/stringify/value-proxy.js 19485 cmd: runTest262 : fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]19485 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict] 19486 19486 - path: test262/test/built-ins/Map/Symbol.species/length.js 19487 19487 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [] … … 22975 22975 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict] 22976 22976 - path: test262/test/built-ins/Object/create/15.2.3.5-4-14.js 22977 cmd: runTest262 : fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []22977 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [] 22978 22978 - path: test262/test/built-ins/Object/create/15.2.3.5-4-14.js 22979 cmd: runTest262 : fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]22979 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict] 22980 22980 - path: test262/test/built-ins/Object/create/15.2.3.5-4-140.js 22981 22981 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [] … … 23747 23747 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict] 23748 23748 - path: test262/test/built-ins/Object/create/15.2.3.5-4-37.js 23749 cmd: runTest262 : fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []23749 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [] 23750 23750 - path: test262/test/built-ins/Object/create/15.2.3.5-4-37.js 23751 cmd: runTest262 : fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]23751 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict] 23752 23752 - path: test262/test/built-ins/Object/create/15.2.3.5-4-38.js 23753 23753 cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [] … … 34331 34331 cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict] 34332 34332 - path: test262/test/built-ins/Object/prototype/toString/proxy.js 34333 cmd: runTest262 : fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []34333 cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [] 34334 34334 - path: test262/test/built-ins/Object/prototype/toString/proxy.js 34335 cmd: runTest262 : fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]34335 cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict] 34336 34336 - path: test262/test/built-ins/Object/prototype/toString/symbol-tag-non-str.js 34337 34337 cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [] … … 73107 73107 cmd: runTest262 :normal, "SyntaxError", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict] 73108 73108 - path: test262/test/language/statements/class/definition/early-errors-class-method-await-in-formals-default.js 73109 cmd: runTest262 : fail, "SyntaxError", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []73109 cmd: runTest262 :normal, "SyntaxError", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [] 73110 73110 - path: test262/test/language/statements/class/definition/early-errors-class-method-await-in-formals-default.js 73111 cmd: runTest262 : fail, "SyntaxError", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]73111 cmd: runTest262 :normal, "SyntaxError", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict] 73112 73112 - path: test262/test/language/statements/class/definition/early-errors-class-method-await-in-formals.js 73113 cmd: runTest262 : fail, "SyntaxError", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []73113 cmd: runTest262 :normal, "SyntaxError", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [] 73114 73114 - path: test262/test/language/statements/class/definition/early-errors-class-method-await-in-formals.js 73115 cmd: runTest262 : fail, "SyntaxError", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]73115 cmd: runTest262 :normal, "SyntaxError", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict] 73116 73116 - path: test262/test/language/statements/class/definition/early-errors-class-method-body-contains-super-call.js 73117 73117 cmd: runTest262 :normal, "SyntaxError", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [] -
trunk/Source/JavaScriptCore/ChangeLog
r205021 r205023 1 2016-08-25 Keith Miller <keith_miller@apple.com> 2 3 toString called on proxies returns incorrect tag 4 https://bugs.webkit.org/show_bug.cgi?id=161111 5 6 Reviewed by Benjamin Poulain. 7 8 This patch adds a new Method table function toStringName. This function 9 is used by Object.prototype.toString to create the string tag that it 10 inserts. Right now it only changes the stringification of proxy objects. 11 In future patches I plan to make it work for other classes of objects as 12 well. 13 14 * runtime/ClassInfo.h: 15 * runtime/JSCell.cpp: 16 (JSC::JSCell::toStringName): 17 * runtime/JSCell.h: 18 * runtime/JSObject.cpp: 19 (JSC::JSObject::toStringName): 20 * runtime/JSObject.h: 21 * runtime/ObjectPrototype.cpp: 22 (JSC::objectProtoFuncToString): 23 * runtime/ProxyObject.cpp: 24 (JSC::ProxyObject::toStringName): 25 * runtime/ProxyObject.h: 26 1 27 2016-08-26 Csaba Osztrogonác <ossy@webkit.org> 2 28 -
trunk/Source/JavaScriptCore/runtime/ClassInfo.h
r201853 r205023 92 92 typedef String (*ClassNameFunctionPtr)(const JSObject*); 93 93 ClassNameFunctionPtr className; 94 ClassNameFunctionPtr toStringName; 94 95 95 96 typedef bool (*CustomHasInstanceFunctionPtr)(JSObject*, ExecState*, JSValue); … … 167 168 &ClassName::getGenericPropertyNames, \ 168 169 &ClassName::className, \ 170 &ClassName::toStringName, \ 169 171 &ClassName::customHasInstance, \ 170 172 &ClassName::defineOwnProperty, \ -
trunk/Source/JavaScriptCore/runtime/JSCell.cpp
r204912 r205023 223 223 } 224 224 225 String JSCell::toStringName(const JSObject*) 226 { 227 RELEASE_ASSERT_NOT_REACHED(); 228 return String(); 229 } 230 225 231 const char* JSCell::className() const 226 232 { -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r204912 r205023 213 213 214 214 static String className(const JSObject*); 215 static String toStringName(const JSObject*); 215 216 JS_EXPORT_PRIVATE static bool customHasInstance(JSObject*, ExecState*, JSValue); 216 217 static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, const PropertyDescriptor&, bool shouldThrow); -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r204912 r205023 307 307 ASSERT(info); 308 308 return info->className; 309 } 310 311 String JSObject::toStringName(const JSObject* object) 312 { 313 const ClassInfo* info = object->classInfo(); 314 ASSERT(info); 315 return info->methodTable.className(object); 309 316 } 310 317 -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r204912 r205023 109 109 JS_EXPORT_PRIVATE static String className(const JSObject*); 110 110 JS_EXPORT_PRIVATE static String calculatedClassName(JSObject*); 111 112 // This function is what Object.prototype.toString() will use to get the name of 113 // an object when using Symbol.toStringTag fails. For the most part there is no 114 // difference between this and className(). The main use case is for new JS language 115 // objects to set the default tag to "Object". 116 JS_EXPORT_PRIVATE static String toStringName(const JSObject*); 111 117 112 118 // This is the fully virtual [[GetPrototypeOf]] internal function defined -
trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
r202890 r205023 299 299 } 300 300 301 String newString = WTF::tryMakeString("[object ", thisObject->methodTable(exec->vm())-> className(thisObject), "]");301 String newString = WTF::tryMakeString("[object ", thisObject->methodTable(exec->vm())->toStringName(thisObject), "]"); 302 302 if (!newString) 303 303 return throwOutOfMemoryError(exec); -
trunk/Source/JavaScriptCore/runtime/ProxyObject.cpp
r204912 r205023 50 50 } 51 51 52 String ProxyObject::toStringName(const JSObject* object) 53 { 54 const JSObject* target = jsCast<const ProxyObject*>(object)->target(); 55 if (isJSArray(target)) 56 return target->classInfo()->methodTable.className(target); 57 return ASCIILiteral("Object"); 58 } 59 52 60 Structure* ProxyObject::structureForTarget(JSGlobalObject* globalObject, JSValue target) 53 61 { -
trunk/Source/JavaScriptCore/runtime/ProxyObject.h
r201703 r205023 76 76 static Structure* structureForTarget(JSGlobalObject*, JSValue target); 77 77 78 static String toStringName(const JSObject*); 78 79 static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&); 79 80 static bool getOwnPropertySlotByIndex(JSObject*, ExecState*, unsigned propertyName, PropertySlot&);
Note: See TracChangeset
for help on using the changeset viewer.