runtimeTypeForValue should protect against seeing TDZ value
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Feb 2016 03:31:11 +0000 (03:31 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Feb 2016 03:31:11 +0000 (03:31 +0000)
commit17b96618c3de14a6bdd4bf8b6727ee52bf482040
treeedc39d948cf8cda069a4467f222f1e0d0acfc519
parent276854b50da32f426c7a7a390c73688d2f72d5b3
runtimeTypeForValue should protect against seeing TDZ value
https://bugs.webkit.org/show_bug.cgi?id=154023

Reviewed by Michael Saboff.

There are a few back traces I've seen from crashes that bottom out
inside runtimeTypeForValue. I haven't been able to reproduce
any such crash, but it's likely that we're encountering the
empty JSValue. It's better to just have this function protect
against seeing the empty value instead of dereferencing a null
pointer when it thinks the value is a cell.

* runtime/RuntimeType.cpp:
(JSC::runtimeTypeForValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/RuntimeType.cpp