tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsAHtml5TreeOpSink.h (876B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 #ifndef nsAHtml5TreeOpSink_h
      6 #define nsAHtml5TreeOpSink_h
      7 
      8 #include "nsTArrayForwardDeclare.h"
      9 
     10 class nsHtml5TreeOperation;
     11 
     12 /**
     13 * The purpose of this interface is to connect a tree op executor
     14 * (main-thread case), a tree op stage (non-speculative off-the-main-thread
     15 * case) or a speculation (speculative case).
     16 */
     17 class nsAHtml5TreeOpSink {
     18 public:
     19  /**
     20   * Flush the operations from the tree operations from the argument
     21   * queue into this sink unconditionally.
     22   *
     23   * Returns `true` on success and `false` on OOM.
     24   */
     25  [[nodiscard]] virtual bool MoveOpsFrom(
     26      nsTArray<nsHtml5TreeOperation>& aOpQueue) = 0;
     27 };
     28 
     29 #endif /* nsAHtml5TreeOpSink_h */