Changeset 212378 in webkit
- Timestamp:
- Feb 15, 2017 10:23:33 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r212377 r212378 1 2017-02-15 Chris Dumez <cdumez@apple.com> 2 3 Expose Symbol.toPrimitive / valueOf on Location instances 4 https://bugs.webkit.org/show_bug.cgi?id=168295 5 6 Reviewed by Geoffrey Garen, Keith Miller and Mark Lam. 7 8 Add test coverage for cases where the Object prototype has been updated before 9 the Location object is constructed. 10 11 * fast/dom/location-valueOf-after-object-prototype-update-expected.txt: Added. 12 * fast/dom/location-valueOf-after-object-prototype-update.html: Added. 13 * fast/dom/location-valueOf-after-object-prototype-update2-expected.txt: Added. 14 * fast/dom/location-valueOf-after-object-prototype-update2.html: Added. 15 1 16 2017-02-15 Ryan Haddad <ryanhaddad@apple.com> 2 17 -
trunk/LayoutTests/imported/w3c/ChangeLog
r212355 r212378 1 2017-02-15 Chris Dumez <cdumez@apple.com> 2 3 Expose Symbol.toPrimitive / valueOf on Location instances 4 https://bugs.webkit.org/show_bug.cgi?id=168295 5 6 Reviewed by Geoffrey Garen, Keith Miller and Mark Lam. 7 8 Import test coverage from upstream web-platform-tests. 9 10 * web-platform-tests/html/browsers/history/the-location-interface/location-symbol-toprimitive-expected.txt: Added. 11 * web-platform-tests/html/browsers/history/the-location-interface/location-symbol-toprimitive.html: Added. 12 * web-platform-tests/html/browsers/history/the-location-interface/location-valueof-expected.txt: Added. 13 * web-platform-tests/html/browsers/history/the-location-interface/location-valueof.html: Added. 14 * web-platform-tests/html/browsers/history/the-location-interface/w3c-import.log: 15 1 16 2017-02-15 Carlos Garcia Campos <cgarcia@igalia.com> 2 17 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/w3c-import.log
r210823 r212378 30 30 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting.html 31 31 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-stringifier.html 32 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-symbol-toprimitive.html 33 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-valueof.html 32 34 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location_assign_about_blank-1.html 33 35 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location_assign_about_blank.html -
trunk/Source/JavaScriptCore/ChangeLog
r212365 r212378 1 2017-02-15 Chris Dumez <cdumez@apple.com> 2 3 Expose Symbol.toPrimitive / valueOf on Location instances 4 https://bugs.webkit.org/show_bug.cgi?id=168295 5 6 Reviewed by Geoffrey Garen, Keith Miller and Mark Lam. 7 8 Cache origin objectProtoValueOf function on JSGlobalObject. 9 10 * runtime/JSGlobalObject.cpp: 11 (JSC::JSGlobalObject::init): 12 * runtime/JSGlobalObject.h: 13 (JSC::JSGlobalObject::objectProtoValueOfFunction): 14 1 15 2017-02-15 Yusuke Suzuki <utatane.tea@gmail.com> 2 16 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r212365 r212378 459 459 m_functionPrototype->structure()->setPrototypeWithoutTransition(vm, m_objectPrototype.get()); 460 460 m_objectStructureForObjectConstructor.set(vm, this, vm.prototypeMap.emptyObjectStructureForPrototype(this, m_objectPrototype.get(), JSFinalObject::defaultInlineCapacity())); 461 m_objectProtoValueOfFunction.set(vm, this, jsCast<JSFunction*>(objectPrototype()->getDirect(vm, vm.propertyNames->valueOf))); 461 462 462 463 JSFunction* thrower = JSFunction::create(vm, this, 0, String(), globalFuncThrowTypeErrorArgumentsCalleeAndCaller); … … 1194 1195 thisObject->m_initializePromiseFunction.visit(visitor); 1195 1196 thisObject->m_iteratorProtocolFunction.visit(visitor); 1197 visitor.append(thisObject->m_objectProtoValueOfFunction); 1196 1198 visitor.append(thisObject->m_newPromiseCapabilityFunction); 1197 1199 visitor.append(thisObject->m_functionProtoHasInstanceSymbolFunction); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r212365 r212378 262 262 LazyProperty<JSGlobalObject, JSFunction> m_initializePromiseFunction; 263 263 LazyProperty<JSGlobalObject, JSFunction> m_iteratorProtocolFunction; 264 WriteBarrier<JSFunction> m_objectProtoValueOfFunction; 264 265 WriteBarrier<JSFunction> m_newPromiseCapabilityFunction; 265 266 WriteBarrier<JSFunction> m_functionProtoHasInstanceSymbolFunction; … … 509 510 JSFunction* initializePromiseFunction() const { return m_initializePromiseFunction.get(this); } 510 511 JSFunction* iteratorProtocolFunction() const { return m_iteratorProtocolFunction.get(this); } 512 JSFunction* objectProtoValueOfFunction() const { return m_objectProtoValueOfFunction.get(); } 511 513 JSFunction* newPromiseCapabilityFunction() const { return m_newPromiseCapabilityFunction.get(); } 512 514 JSFunction* functionProtoHasInstanceSymbolFunction() const { return m_functionProtoHasInstanceSymbolFunction.get(); } -
trunk/Source/WebCore/ChangeLog
r212376 r212378 1 2017-02-15 Chris Dumez <cdumez@apple.com> 2 3 Expose Symbol.toPrimitive / valueOf on Location instances 4 https://bugs.webkit.org/show_bug.cgi?id=168295 5 6 Reviewed by Geoffrey Garen, Keith Miller and Mark Lam. 7 8 Expose Symbol.toPrimitive / valueOf on Location instances as per: 9 - https://html.spec.whatwg.org/#the-location-interface 10 11 Firefox and Chrome already comply with the specification. 12 13 Tests: fast/dom/location-valueOf-after-object-prototype-update.html 14 fast/dom/location-valueOf-after-object-prototype-update2.html 15 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-symbol-toprimitive.html 16 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-valueof.html 17 18 * bindings/scripts/CodeGeneratorJS.pm: 19 (GenerateImplementation): 20 1 21 2017-02-15 Aakash Jain <aakash_jain@apple.com> 2 22 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r212344 r212378 3430 3430 } 3431 3431 3432 if ($interfaceName eq "Location") { 3433 push(@implContent, " putDirect(vm, vm.propertyNames->valueOf, globalObject()->objectProtoValueOfFunction(), DontDelete | ReadOnly | DontEnum);\n"); 3434 push(@implContent, " putDirect(vm, vm.propertyNames->toPrimitiveSymbol, jsUndefined(), DontDelete | ReadOnly | DontEnum);\n"); 3435 } 3436 3432 3437 # Support for RuntimeEnabled attributes on instances. 3433 3438 foreach my $attribute (@{$interface->attributes}) {
Note: See TracChangeset
for help on using the changeset viewer.