tor-browser

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

ScriptErrorHelper.h (1172B)


      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 mozilla_dom_indexeddb_scripterrorhelper_h__
      8 #define mozilla_dom_indexeddb_scripterrorhelper_h__
      9 
     10 #include <inttypes.h>
     11 
     12 #include "nsStringFwd.h"
     13 
     14 namespace mozilla {
     15 struct JSCallingLocation;
     16 }
     17 
     18 namespace mozilla::dom::indexedDB {
     19 
     20 // Helper to report a script error to the main thread.
     21 class ScriptErrorHelper {
     22 public:
     23  static void Dump(const nsAString& aMessage, const JSCallingLocation&,
     24                   uint32_t aSeverityFlag, /* nsIScriptError::xxxFlag */
     25                   bool aIsChrome, uint64_t aInnerWindowID);
     26 
     27  static void DumpLocalizedMessage(
     28      const nsACString& aMessageName, const JSCallingLocation&,
     29      uint32_t aSeverityFlag, /* nsIScriptError::xxxFlag */
     30      bool aIsChrome, uint64_t aInnerWindowID);
     31 };
     32 
     33 }  // namespace mozilla::dom::indexedDB
     34 
     35 #endif  // mozilla_dom_indexeddb_scripterrorhelper_h__