Exemple #1
0
 private void OnExecutionContextDestroyed(RuntimeExecutionContextDestroyedFirefoxEvent e)
 {
     if (ContextIdToContext.TryRemove(e.ExecutionContextId, out var context))
     {
         context.Frame.ContextDestroyed(context);
     }
 }
Exemple #2
0
 private void RemoveContextsForFrame(object sender, FrameEventArgs e)
 {
     foreach (var pair in ContextIdToContext)
     {
         if (pair.Value.Frame == e.Frame)
         {
             ContextIdToContext.TryRemove(pair.Key, out _);
         }
     }
 }
        private void OnExecutionContextDestroyed(int executionContextId)
        {
            if (!ContextIdToContext.TryGetValue(executionContextId, out var context))
            {
                return;
            }

            ContextIdToContext.TryRemove(executionContextId, out _);
            context.Frame.ContextDestroyed(context);
        }