From 39128ff1f3e6caa57ad17c8da5a1101fd797524c Mon Sep 17 00:00:00 2001 From: "oliver@apple.com" Date: Wed, 8 Feb 2012 21:35:34 +0000 Subject: [PATCH] Fix issue encountered while debugging stacktraces https://bugs.webkit.org/show_bug.cgi?id=78147 Reviewed by Gavin Barraclough. Debugging is easier if we always ensure that we have a non-null inferred name. * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107128 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/JavaScriptCore/ChangeLog | 13 +++++++++++++ Source/JavaScriptCore/runtime/Executable.cpp | 4 ++-- Source/JavaScriptCore/runtime/JSFunction.cpp | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index 9de32d2..fa3548e 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,5 +1,18 @@ 2012-02-08 Oliver Hunt + Fix issue encountered while debugging stacktraces + https://bugs.webkit.org/show_bug.cgi?id=78147 + + Reviewed by Gavin Barraclough. + + Debugging is easier if we always ensure that we have a non-null + inferred name. + + * runtime/Executable.cpp: + (JSC::FunctionExecutable::FunctionExecutable): + +2012-02-08 Oliver Hunt + updateTopCallframe in the baseline JIT doesn't provide enough information to the stubs https://bugs.webkit.org/show_bug.cgi?id=78145 diff --git a/Source/JavaScriptCore/runtime/Executable.cpp b/Source/JavaScriptCore/runtime/Executable.cpp index c67c54c..bad2bae 100644 --- a/Source/JavaScriptCore/runtime/Executable.cpp +++ b/Source/JavaScriptCore/runtime/Executable.cpp @@ -137,7 +137,7 @@ FunctionExecutable::FunctionExecutable(JSGlobalData& globalData, const Identifie , m_forceUsesArguments(forceUsesArguments) , m_parameters(parameters) , m_name(name) - , m_inferredName(inferredName) + , m_inferredName(inferredName.isNull() ? exec->globalData().propertyNames->emptyIdentifier : inferredName) , m_symbolTable(0) { } @@ -148,7 +148,7 @@ FunctionExecutable::FunctionExecutable(ExecState* exec, const Identifier& name, , m_forceUsesArguments(forceUsesArguments) , m_parameters(parameters) , m_name(name) - , m_inferredName(inferredName) + , m_inferredName(inferredName.isNull() ? exec->globalData().propertyNames->emptyIdentifier : inferredName) , m_symbolTable(0) { } diff --git a/Source/JavaScriptCore/runtime/JSFunction.cpp b/Source/JavaScriptCore/runtime/JSFunction.cpp index 4332e09..72e1ce1 100644 --- a/Source/JavaScriptCore/runtime/JSFunction.cpp +++ b/Source/JavaScriptCore/runtime/JSFunction.cpp @@ -370,7 +370,7 @@ UString getCalculatedDisplayName(CallFrame* callFrame, JSObject* object) return function->calculatedDisplayName(callFrame); if (InternalFunction* function = jsDynamicCast(object)) return function->calculatedDisplayName(callFrame); - return UString(); + return callFrame->globalData().propertyNames->emptyIdentifier.ustring(); } } // namespace JSC -- 2.7.4