Eine aufbereitete Darstellung der Quelle

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

Benutzer

SSL SecurityWrapper.cpp   Interaktion und
PortierbarkeitC

 

/* 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/. */


#include "NamespaceImports.h"

#include "js/friend/ErrorMessages.h"  // JSMSG_*
#include "js/Wrapper.h"
#include "vm/JSObject.h"
#include "vm/StringType.h"

using namespace js;

template <class Base>
bool SecurityWrapper<Base>::enter(JSContext* cx, HandleObject wrapper,
                                  HandleId id, Wrapper::Action act,
                                  bool mayThrow, bool* bp) const {
  ReportAccessDenied(cx);
  *bp = false;
  return false;
}

template <class Base>
bool SecurityWrapper<Base>::nativeCall(JSContext* cx, IsAcceptableThis test,
                                       NativeImpl impl,
                                       const CallArgs& args) const {
  ReportAccessDenied(cx);
  return false;
}

template <class Base>
bool SecurityWrapper<Base>::setPrototype(JSContext* cx, HandleObject wrapper,
                                         HandleObject proto,
                                         ObjectOpResult& result) const {
  ReportAccessDenied(cx);
  return false;
}

template <class Base>
bool SecurityWrapper<Base>::setImmutablePrototype(JSContext* cx,
                                                  HandleObject wrapper,
                                                  bool* succeeded) const {
  ReportAccessDenied(cx);
  return false;
}

template <class Base>
bool SecurityWrapper<Base>::preventExtensions(JSContext* cx,
                                              HandleObject wrapper,
                                              ObjectOpResult& result) const {
  // Just like BaseProxyHandler, SecurityWrappers claim by default to always
  // be extensible, so as not to leak information about the state of the
  // underlying wrapped thing.
  return result.fail(JSMSG_CANT_CHANGE_EXTENSIBILITY);
}

template <class Base>
bool SecurityWrapper<Base>::isExtensible(JSContext* cx, HandleObject wrapper,
                                         bool* extensible) const {
  // See above.
  *extensible = true;
  return true;
}

template <class Base>
bool SecurityWrapper<Base>::getBuiltinClass(JSContext* cx, HandleObject wrapper,
                                            ESClass* cls) const {
  *cls = ESClass::Other;
  return true;
}

template <class Base>
bool SecurityWrapper<Base>::isArray(JSContext* cx, HandleObject obj,
                                    JS::IsArrayAnswer* answer) const {
  // This should ReportAccessDenied(cx), but bug 849730 disagrees.  :-(
  *answer = JS::IsArrayAnswer::NotArray;
  return true;
}

template <class Base>
RegExpShared* SecurityWrapper<Base>::regexp_toShared(JSContext* cx,
                                                     HandleObject obj) const {
  return Base::regexp_toShared(cx, obj);
}

template <class Base>
bool SecurityWrapper<Base>::boxedValue_unbox(JSContext* cx, HandleObject obj,
                                             MutableHandleValue vp) const {
  vp.setUndefined();
  return true;
}

template <class Base>
bool SecurityWrapper<Base>::defineProperty(JSContext* cx, HandleObject wrapper,
                                           HandleId id,
                                           Handle<PropertyDescriptor> desc,
                                           ObjectOpResult& result) const {
  if (desc.isAccessorDescriptor()) {
    return Throw(cx, id, JSMSG_ACCESSOR_DEF_DENIED);
  }

  return Base::defineProperty(cx, wrapper, id, desc, result);
}

template class js::SecurityWrapper<Wrapper>;
template class js::SecurityWrapper<CrossCompartmentWrapper>;

Messung V0.5 in Prozent
C=94 H=100 G=96

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-29) ¤

*Bot Zugriff






über den Urheber dieser Seite

Die Firma ist wie angegeben erreichbar.

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Anfrage:

Dauer der Verarbeitung:

Sekunden

sprechenden Kalenders






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126438
#Domains=1897691