tor-browser

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

PerformanceHint.h (1004B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 * vim: set ts=8 sts=2 et sw=2 tw=80:
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef js_friend_PerformanceHint_h
      8 #define js_friend_PerformanceHint_h
      9 
     10 #include "jstypes.h"       // JS_PUBLIC_API
     11 #include "js/TypeDecls.h"  // JSContext
     12 
     13 namespace js {
     14 namespace gc {
     15 
     16 // API to let the DOM tell us whether we're currently in pageload.
     17 //
     18 // This currently affects nursery sizing; we tolerate large nursery sizes (and
     19 // hence longer minor GC pauses) during pageload so as not to limit performance.
     20 
     21 enum class PerformanceHint { Normal, InPageLoad };
     22 
     23 extern JS_PUBLIC_API void SetPerformanceHint(JSContext* cx,
     24                                             PerformanceHint hint);
     25 
     26 } /* namespace gc */
     27 } /* namespace js */
     28 
     29 #endif  // js_friend_PerformanceHint_h