File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ namespace Js
31
31
{
32
32
undeferredFunctionType = functionProxy->GetUndeferredFunctionType ();
33
33
}
34
- if (undeferredFunctionType && !isProto && !instance->IsCrossSiteObject ())
34
+ if (undeferredFunctionType && !isProto && !instance->IsCrossSiteObject () && (undeferredFunctionType-> GetPrototype () == instance-> GetType ()-> GetPrototype ()) )
35
35
{
36
36
Assert (undeferredFunctionType->GetIsShared ());
37
37
Assert (!CrossSite::IsThunk (undeferredFunctionType->GetEntryPoint ()));
@@ -40,9 +40,8 @@ namespace Js
40
40
else
41
41
{
42
42
typeHandler->SetInstanceTypeHandler (instance);
43
- if (functionProxy && !isProto && typeHandler->GetMayBecomeShared () && !CrossSite::IsThunk (instance->GetType ()->GetEntryPoint ()) && !PHASE_OFF1 (ShareFuncTypesPhase))
43
+ if (functionProxy && !isProto && typeHandler->GetMayBecomeShared () && !CrossSite::IsThunk (instance->GetType ()->GetEntryPoint ()) && !functionProxy-> GetUndeferredFunctionType () && ! PHASE_OFF1 (ShareFuncTypesPhase))
44
44
{
45
- Assert (!functionProxy->GetUndeferredFunctionType ());
46
45
functionProxy->SetUndeferredFunctionType (ScriptFunction::UnsafeFromVar (instance)->GetScriptFunctionType ());
47
46
instance->ShareType ();
48
47
}
You can’t perform that action at this time.
0 commit comments