tor-browser

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

PipelineError.h (1090B)


      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 #ifndef GPU_PipelineError_H_
      7 #define GPU_PipelineError_H_
      8 
      9 #include "Error.h"
     10 #include "mozilla/dom/DOMException.h"
     11 #include "mozilla/dom/WebGPUBinding.h"
     12 #include "nsIGlobalObject.h"
     13 
     14 namespace mozilla::webgpu {
     15 
     16 class PipelineError final : public dom::DOMException {
     17 public:
     18  GPU_DECL_JS_WRAP(PipelineError)
     19 
     20  explicit PipelineError(const nsACString& aMessage,
     21                         dom::GPUPipelineErrorReason aReason);
     22 
     23  ~PipelineError() override = default;
     24 
     25  static already_AddRefed<PipelineError> Constructor(
     26      const dom::GlobalObject& global, const nsAString& message,
     27      const dom::GPUPipelineErrorInit& options);
     28 
     29  dom::GPUPipelineErrorReason Reason() const;
     30 
     31 private:
     32  dom::GPUPipelineErrorReason mReason;
     33 };
     34 
     35 }  // namespace mozilla::webgpu
     36 
     37 #endif  // GPU_PipelineError_H_