Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  DebuggerNotification.h  Sprache: C


/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#ifndef mozilla_dom_DebuggerNotification_h
#define mozilla_dom_DebuggerNotification_h

#include "DebuggerNotificationManager.h"
#include "mozilla/dom/DebuggerNotificationBinding.h"
#include "nsIGlobalObject.h"
#include "nsISupports.h"
#include "nsWrapperCache.h"

namespace mozilla::dom {

class DebuggerNotification : public nsISupports, public nsWrapperCache {
 public:
  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
  NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(DebuggerNotification)

  DebuggerNotification(nsIGlobalObject* aDebuggeeGlobal,
                       DebuggerNotificationType aType,
                       nsIGlobalObject* aRelevantGlobal = nullptr)
      : mType(aType),
        mDebuggeeGlobal(aDebuggeeGlobal),
        mRelevantGlobal(aRelevantGlobal) {}

  nsIGlobalObject* GetParentObject() const {
    MOZ_ASSERT(mRelevantGlobal,
               "Notification must be cloned into an observer global before "
               "being wrapped");
    return mRelevantGlobal;
  }

  DebuggerNotificationType Type() const { return mType; }

  void GetGlobal(JSContext* aCx, JS::MutableHandle<JSObject*> aResult) {
    aResult.set(mDebuggeeGlobal->GetGlobalJSObject());
  }

  virtual already_AddRefed<DebuggerNotification> CloneInto(
      nsIGlobalObject* aNewOwner) const;

  // nsWrapperCache
  virtual JSObject* WrapObject(JSContext* aCx,
                               JS::Handle<JSObject*> aGivenProto) override;

 protected:
  virtual ~DebuggerNotification() = default;

  DebuggerNotificationType mType;
  nsCOMPtr<nsIGlobalObject> mDebuggeeGlobal;

 private:
  nsCOMPtr<nsIGlobalObject> mRelevantGlobal;
};

MOZ_CAN_RUN_SCRIPT inline void DebuggerNotificationDispatch(
    nsIGlobalObject* aDebuggeeGlobal, DebuggerNotificationType aType) {
  auto manager = DebuggerNotificationManager::ForDispatch(aDebuggeeGlobal);
  if (MOZ_UNLIKELY(manager)) {
    manager->Dispatch<DebuggerNotification>(aType);
  }
}

}  // namespace mozilla::dom

#endif  // mozilla_dom_DebuggerNotification_h

Messung
CHZG
929710096

¤ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet am  2026-11-25) ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

letze Version des Elbe Quellennavigators


letze Version des Demonstrationsprogramms Goedel
letze Version des Bille Abgleichprogramms
Version

Jenseits des Üblichen ....

Besucher

Besucher

Statistik
#Sources=1,188,962
#Domains=963,585