tor-browser

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

OutOfMemoryError.cpp (781B)


      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 "OutOfMemoryError.h"
      7 
      8 #include "mozilla/dom/WebGPUBinding.h"
      9 
     10 namespace mozilla::webgpu {
     11 
     12 GPU_IMPL_JS_WRAP(OutOfMemoryError)
     13 
     14 already_AddRefed<OutOfMemoryError> OutOfMemoryError::Constructor(
     15    const dom::GlobalObject& aGlobal, const nsAString& aString,
     16    ErrorResult& aRv) {
     17  nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
     18  MOZ_RELEASE_ASSERT(global);
     19  return MakeAndAddRef<OutOfMemoryError>(global, aString);
     20 }
     21 
     22 }  // namespace mozilla::webgpu