File tree 3 files changed +1
-21
lines changed
3 files changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,5 @@ public interface IJavaScriptEngineFactory
26
26
/// </summary>
27
27
/// <returns>The JavaScript engine</returns>
28
28
PooledJsEngine GetEngine ( ) ;
29
-
30
- /// <summary>
31
- /// Returns an engine to the pool so it can be reused
32
- /// </summary>
33
- /// <param name="engine">Engine to return</param>
34
- void ReturnEngineToPool ( PooledJsEngine engine ) ;
35
29
}
36
30
}
Original file line number Diff line number Diff line change @@ -229,20 +229,6 @@ public virtual PooledJsEngine GetEngine()
229
229
return _pool . GetEngine ( ) ;
230
230
}
231
231
232
- /// <summary>
233
- /// Returns an engine to the pool so it can be reused
234
- /// </summary>
235
- /// <param name="engine">Engine to return</param>
236
- public virtual void ReturnEngineToPool ( PooledJsEngine engine )
237
- {
238
- // This could be called from ReactEnvironment.Dispose if that class is disposed after
239
- // this class. Let's just ignore this if it's disposed.
240
- if ( ! _disposed )
241
- {
242
- engine . Dispose ( ) ;
243
- }
244
- }
245
-
246
232
/// <summary>
247
233
/// Gets a factory for the most appropriate JavaScript engine for the current environment.
248
234
/// The first functioning JavaScript engine with the lowest priority will be used.
Original file line number Diff line number Diff line change @@ -400,7 +400,7 @@ public void ReturnEngineToPool()
400
400
{
401
401
if ( _engineFromPool . IsValueCreated )
402
402
{
403
- _engineFactory . ReturnEngineToPool ( _engineFromPool . Value ) ;
403
+ _engineFromPool . Value . Dispose ( ) ;
404
404
_engineFromPool = new Lazy < PooledJsEngine > ( ( ) => _engineFactory . GetEngine ( ) ) ;
405
405
}
406
406
}
You can’t perform that action at this time.
0 commit comments