Skip to content

Commit fa03139

Browse files
committed
[MERGE chakra-core#2544 @pleath] Don't attempt to get redeferred FunctionBody from JavascriptExceptionObject
Merge pull request chakra-core#2544 from pleath:9774444
2 parents 9a01a74 + cc02755 commit fa03139

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

lib/Runtime/Language/JavascriptExceptionObject.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,15 @@ namespace Js
137137
FunctionBody* JavascriptExceptionObject::GetFunctionBody() const
138138
{
139139
// If it is a throwing function; it must be deserialized
140-
return exceptionContext.ThrowingFunction() ? exceptionContext.ThrowingFunction()->GetFunctionBody() : NULL;
140+
if (exceptionContext.ThrowingFunction())
141+
{
142+
ParseableFunctionInfo *info = exceptionContext.ThrowingFunction()->GetParseableFunctionInfo();
143+
if (info->IsFunctionBody())
144+
{
145+
return info->GetFunctionBody();
146+
}
147+
}
148+
return nullptr;
141149
}
142150

143151
JavascriptExceptionContext::StackFrame::StackFrame(JavascriptFunction* func, const JavascriptStackWalker& walker, bool initArgumentTypes)

0 commit comments

Comments
 (0)