haikuwebkit/LayoutTests/js/regress-139418-expected.txt

10 lines
183 B
Plaintext
Raw Permalink Normal View History

A "cached" null setter should throw a TypeException when called in strict mode and doesn't https://bugs.webkit.org/show_bug.cgi?id=139418 Reviewed by Filip Pizlo. Source/JavaScriptCore: Made a new NullSetterFunction class similar to NullGetterFunction. The difference is that NullSetterFunction will throw a TypeError per the ECMA262 spec for a strict mode caller. * CMakeLists.txt: * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: * JavaScriptCore.xcodeproj/project.pbxproj: Added new files NullSetterFunction.cpp and NullSetterFunction.h. * runtime/GetterSetter.h: (JSC::GetterSetter::GetterSetter): (JSC::GetterSetter::isSetterNull): (JSC::GetterSetter::setSetter): Change setter instances from using NullGetterFunction to using NullSetterFunction. * runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init): * runtime/JSGlobalObject.h: (JSC::JSGlobalObject::nullSetterFunction): Added m_nullSetterFunction and accessor. * runtime/NullSetterFunction.cpp: Added. (JSC::GetCallerStrictnessFunctor::GetCallerStrictnessFunctor): (JSC::GetCallerStrictnessFunctor::operator()): (JSC::GetCallerStrictnessFunctor::callerIsStrict): (JSC::callerIsStrict): Method to determine if the caller is in strict mode. (JSC::callReturnUndefined): (JSC::constructReturnUndefined): (JSC::NullSetterFunction::getCallData): (JSC::NullSetterFunction::getConstructData): * runtime/NullSetterFunction.h: Added. (JSC::NullSetterFunction::create): (JSC::NullSetterFunction::createStructure): (JSC::NullSetterFunction::NullSetterFunction): Class with handlers for a null setter. LayoutTests: New regression test. * js/regress-139418-expected.txt: Added. * js/regress-139418.html: Added. * js/script-tests/regress-139418.js: Added. (InnerObjectNoSetter): (InnerObjectNoSetter.prototype.get enabled): (StrictOuterObject): (StrictOuterObject.prototype.get enabled): (StrictOuterObject.prototype.set enabled): Canonical link: https://commits.webkit.org/158626@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-20 05:28:04 +00:00
Regression test for https://webkit.org/b/139418.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE