Source/JavaScriptCore: Optimize addStrackTraceIfNecessary to be faster in the case when it's not necessary
https://bugs.webkit.org/show_bug.cgi?id=118328

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-07-12
Reviewed by Geoffrey Garen.

Retrieving the stack is costly. We want to get it only once. By moving the check
for the .stack property above the code to retrieve the stack, we ensure this.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::addStackTraceIfNecessary):

LayoutTests: By optimizing when the stack is added a two tests needed to be modifed to show correct results.
https://bugs.webkit.org/show_bug.cgi?id=118328

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-07-12
Reviewed by Geoffrey Garen.

* inspector/console/console-exception-stack-traces.html: This test compares the console's currect
stack with the error object's stack. The test was failing on decodeURI() and eval() which create
a new frame on the stack to execute. The console's stack was unaware of these calls and the size
of the stacks would not match. I added a check to pass if it was the specific case with decodeURI
or eval.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152606 268f45cc-cd09-0410-ab3c-d52691b4dbfc