Assertion failure for direct eval in non-class method
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 May 2016 14:28:30 +0000 (14:28 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 May 2016 14:28:30 +0000 (14:28 +0000)
commit4486a6d27183ac9f40aaa8fbb8847c8c47b90662
tree3a22178d20d88118482d519a102a9e892c240035
parent682870eb3a0a2d49c553d61e8a7531493c5ba4ac
Assertion failure for direct eval in non-class method
https://bugs.webkit.org/show_bug.cgi?id=157138

Reviewed by Saam Barati.

This assertion was incorrect. In method definitions in object literals,
it can be sloppy mode, but its DerivedContextType may not be DerivedContextType::None.

* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::CacheKey::CacheKey):
(JSC::EvalCodeCache::CacheKey::operator==):
(JSC::EvalCodeCache::CacheKey::Hash::equal):
(JSC::EvalCodeCache::tryGet):
(JSC::EvalCodeCache::getSlow):
* interpreter/Interpreter.cpp:
(JSC::eval):
* tests/stress/direct-eval-in-object-literal-methods.js: Added.
(shouldBe):
(throw.new.Error):
(shouldBe.Parent.prototype.l):
(shouldBe.Parent):
(shouldBe.Derived.prototype.m):
(shouldBe.Derived):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/EvalCodeCache.h
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/tests/stress/direct-eval-in-object-literal-methods.js [new file with mode: 0644]