tor-browser

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

TestNoNewThreadsChecker.cpp (620B)


      1 // Dummy NS_NewNamedThread.
      2 void NS_NewNamedThread(const char *aName) {}
      3 
      4 void func_threads() {
      5  // Test to see if the checker recognizes a bad name, and if it recognizes a
      6  // name from the ThreadAllows.txt.
      7  NS_NewNamedThread("A bad name"); // expected-error {{Thread name not recognized. Please use the background thread pool.}} expected-note {{NS_NewNamedThread has been deprecated in favor of background task dispatch via NS_DispatchBackgroundTask and NS_CreateBackgroundTaskQueue. If you must create a new ad-hoc thread, have your thread name added to ThreadAllows.txt.}}
      8  NS_NewNamedThread("Checker Test");
      9 }