File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1319,6 +1319,7 @@ namespace Js
1319
1319
bool IsClassMethod () const ;
1320
1320
bool IsModule () const ;
1321
1321
bool HasSuperReference () const ;
1322
+ bool IsCoroutine () const ;
1322
1323
bool GetCapturesThis () const ;
1323
1324
void SetCapturesThis ();
1324
1325
bool GetEnclosedByGlobalFunc () const ;
@@ -1525,6 +1526,13 @@ namespace Js
1525
1526
return GetFunctionInfo ()->HasSuperReference ();
1526
1527
}
1527
1528
1529
+ inline bool FunctionProxy::IsCoroutine () const
1530
+ {
1531
+ Assert (GetFunctionInfo ());
1532
+ Assert (GetFunctionInfo ()->GetFunctionProxy () == this );
1533
+ return GetFunctionInfo ()->IsCoroutine ();
1534
+ }
1535
+
1528
1536
inline bool FunctionProxy::GetCapturesThis () const
1529
1537
{
1530
1538
Assert (GetFunctionInfo ());
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ namespace Js
239
239
240
240
scriptContext->AddToNewFunctionMap (key, functionInfo->GetFunctionInfo ());
241
241
}
242
- else if (pfuncInfoCache->IsGenerator ())
242
+ else if (pfuncInfoCache->IsCoroutine ())
243
243
{
244
244
pfuncScript = scriptContext->GetLibrary ()->CreateGeneratorVirtualScriptFunction (pfuncInfoCache->GetFunctionProxy ());
245
245
}
You can’t perform that action at this time.
0 commit comments