tor-browser

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

Error.cpp (669B)


      1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #include "Error.h"
      7 
      8 namespace mozilla::webgpu {
      9 
     10 GPU_IMPL_CYCLE_COLLECTION(Error, mGlobal)
     11 
     12 Error::Error(nsIGlobalObject* const aGlobal, const nsACString& aMessage)
     13    : mGlobal(aGlobal) {
     14  CopyUTF8toUTF16(aMessage, mMessage);
     15 }
     16 
     17 Error::Error(nsIGlobalObject* const aGlobal, const nsAString& aMessage)
     18    : mGlobal(aGlobal), mMessage(aMessage) {}
     19 
     20 }  // namespace mozilla::webgpu