Fixes a crash in KJS::JSValue::toObject when closing
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Apr 2008 00:06:12 +0000 (00:06 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Apr 2008 00:06:12 +0000 (00:06 +0000)
commitc523491eb8be73b24ca91fb828c0af95e2b64e1a
tree7b74d506e24de2c71b805b62fa5a9927ca95ae7f
parent68fa597cf56266db5a42c5104abef5509f0273e6
Fixes a crash in KJS::JSValue::toObject when closing
Safari with Inspector open.

http://bugs.webkit.org/show_bug.cgi?id=18371

Reviewed by Adam Roben.

* page/InspectorController.cpp:
(WebCore::inspectedWindow): NULL check the result of toJSDOMWindow.
Return JSNull if JSDOMWindow is 0.
* page/inspector/ElementsPanel.js:
(ElementsPanel.prototype.reset): NULL check the result of
InspectorController.inspectedWindow.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/page/InspectorController.cpp
WebCore/page/inspector/ElementsPanel.js