constructFunctionSkippingEvalEnabledCheck() is instantiating JSFunction, JSGeneratorFunction, JSAsyncFunction, and JSAsyncGeneratorFunction with a structure from potentially another realm. Hence, it should use the scope object from that realm as well.
<rdar://problem/105434457>
<rdar://problem/105434535>
Pull request: https://github.com/WebKit/WebKit/pull/10073