Bug 1472976 part 6 - Remove unused xpc::AccessCheck::getPrincipal method. r=mrbkap
authorJan de Mooij <jdemooij@mozilla.com>
Fri, 10 Aug 2018 11:57:40 +0200
changeset 486065 3c3a7d2137942e8b839e8c3f44e1d9a7474a4873
parent 486064 efacd0e6ef9b0007aac034bf2cea86c07590db2d
child 486066 e574b6c899c1e4e8f7a087483d8bbb16edd554cf
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1472976
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1472976 part 6 - Remove unused xpc::AccessCheck::getPrincipal method. r=mrbkap
js/xpconnect/wrappers/AccessCheck.cpp
js/xpconnect/wrappers/AccessCheck.h
--- a/js/xpconnect/wrappers/AccessCheck.cpp
+++ b/js/xpconnect/wrappers/AccessCheck.cpp
@@ -101,22 +101,16 @@ AccessCheck::isChrome(JS::Compartment* c
 }
 
 bool
 AccessCheck::isChrome(JSObject* obj)
 {
     return isChrome(js::GetObjectCompartment(obj));
 }
 
-nsIPrincipal*
-AccessCheck::getPrincipal(JS::Compartment* compartment)
-{
-    return GetCompartmentPrincipal(compartment);
-}
-
 // Hardcoded policy for cross origin property access. See the HTML5 Spec.
 static bool
 IsPermitted(CrossOriginObjectType type, JSFlatString* prop, bool set)
 {
     size_t propLength = JS_GetStringLength(JS_FORGET_STRING_FLATNESS(prop));
     if (!propLength)
         return false;
 
--- a/js/xpconnect/wrappers/AccessCheck.h
+++ b/js/xpconnect/wrappers/AccessCheck.h
@@ -20,17 +20,16 @@ class AccessCheck {
     static bool subsumes(JS::Compartment* a, JS::Compartment* b);
     static bool subsumes(JSObject* a, JSObject* b);
     static bool wrapperSubsumes(JSObject* wrapper);
     static bool subsumesConsideringDomain(JS::Compartment* a, JS::Compartment* b);
     static bool subsumesConsideringDomainIgnoringFPD(JS::Compartment* a,
                                                      JS::Compartment* b);
     static bool isChrome(JS::Compartment* compartment);
     static bool isChrome(JSObject* obj);
-    static nsIPrincipal* getPrincipal(JS::Compartment* compartment);
     static bool isCrossOriginAccessPermitted(JSContext* cx, JS::HandleObject obj,
                                              JS::HandleId id, js::Wrapper::Action act);
     static bool checkPassToPrivilegedCode(JSContext* cx, JS::HandleObject wrapper,
                                           JS::HandleValue value);
     static bool checkPassToPrivilegedCode(JSContext* cx, JS::HandleObject wrapper,
                                           const JS::CallArgs& args);
     // Called to report the correct sort of exception when our policy denies and
     // should throw.  The accessType argument should be one of "access",