[JSC] Web Inspector: CRASH running $0, $1, etc before they are set
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 21:56:46 +0000 (21:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 21:56:46 +0000 (21:56 +0000)
commit1bd7e143c5a35401ae857778faca53aaff10e72c
treeefc5c74672f9acfd34d8d44d82a8e2620b65d988
parentb65f5d909679e9d7797820dd3a64f5e3525e7511
[JSC] Web Inspector: CRASH running $0, $1, etc before they are set
https://bugs.webkit.org/show_bug.cgi?id=81082

Source/WebCore:

Don't return an invalid JSValue. Check if the ScriptValue
has no value and return undefined in that case.

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2012-03-14
Reviewed by Pavel Feldman.

Updated test: inspector/console/command-line-api.html

* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::inspectedObject):

LayoutTests:

Test for an undefined inspectedObject.

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2012-03-14
Reviewed by Pavel Feldman.

* inspector/console/command-line-api-expected.txt:
* inspector/console/command-line-api.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/console/command-line-api-expected.txt
LayoutTests/inspector/console/command-line-api.html
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp