Skip to content

Commit 46e18ff

Browse files
author
Suwei Chen
committed
OS10895818: F12 edge crash when debugging google.com
For global function inside direct eval, FuncAllowsDirectSuper() looks up JavaScript caller through stackwalker to determine if the eval is called from a class constructor. Need to check if functionBody exists to cover the case where eval is called by F12 from inside a built-in function.
1 parent 08c1053 commit 46e18ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Runtime/ByteCode/ByteCodeGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2585,7 +2585,7 @@ bool FuncAllowsDirectSuper(FuncInfo *funcInfo, ByteCodeGenerator *byteCodeGenera
25852585
if (funcInfo->IsGlobalFunction() && ((byteCodeGenerator->GetFlags() & fscrEval) != 0))
25862586
{
25872587
Js::JavascriptFunction *caller = nullptr;
2588-
if (Js::JavascriptStackWalker::GetCaller(&caller, byteCodeGenerator->GetScriptContext()))
2588+
if (Js::JavascriptStackWalker::GetCaller(&caller, byteCodeGenerator->GetScriptContext()) && Js::ScriptFunction::Is(caller))
25892589
{
25902590
Js::FunctionBody * callerBody = caller->GetFunctionBody();
25912591
Assert(callerBody);

0 commit comments

Comments
 (0)