Bug 584977 mark deprecated caps interfaces and methods with [deprecated]
authortimeless@mozdev.org
Sun, 27 Mar 2011 23:59:17 -0400
changeset 64053 205e81133b5f62d21dcd46e1aee9efe577d95d12
parent 64052 3c29b5d377f4644f181dd24fd5297925a79833ea
child 64054 550d5801b36c0c28feaccc61f627734acc5c167c
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs584977
milestone2.2a1pre
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 584977 mark deprecated caps interfaces and methods with [deprecated] r=dveditz
caps/idl/nsIScriptSecurityManager.idl
--- a/caps/idl/nsIScriptSecurityManager.idl
+++ b/caps/idl/nsIScriptSecurityManager.idl
@@ -52,17 +52,17 @@ interface nsIScriptSecurityManager : nsI
                                         in JSObjectPtr aJSObject,
                                         in string aClassName,
                                         in jsid aProperty,
                                         in PRUint32 aAction);
 
     /**
      * Check that the script currently running in context "cx" can load "uri".
      *
-     * Will return error code NS_ERROR_DOM_BAD_URI if the load request 
+     * Will return error code NS_ERROR_DOM_BAD_URI if the load request
      * should be denied.
      *
      * @param cx the JSContext of the script causing the load
      * @param uri the URI that is being loaded
      */
     [noscript] void checkLoadURIFromScript(in JSContextPtr cx, in nsIURI uri);
 
     /**
@@ -100,63 +100,63 @@ interface nsIScriptSecurityManager : nsI
     //   Firefox 1.0.4.  Use in prior versions WILL BE IGNORED.
     // When using this, make sure that you actually want DISALLOW_SCRIPT, not
     // DISALLOW_INHERIT_PRINCIPAL
     const unsigned long DISALLOW_SCRIPT = 1 << 3;
 
     /**
      * Check that content with principal aPrincipal can load "uri".
      *
-     * Will return error code NS_ERROR_DOM_BAD_URI if the load request 
+     * Will return error code NS_ERROR_DOM_BAD_URI if the load request
      * should be denied.
      *
      * @param aPrincipal the principal identifying the actor causing the load
      * @param uri the URI that is being loaded
      * @param flags the permission set, see above
      */
     void checkLoadURIWithPrincipal(in nsIPrincipal aPrincipal,
-                                   in nsIURI uri, 
+                                   in nsIURI uri,
                                    in unsigned long flags);
 
     /**
      * Check that content from "from" can load "uri".
      *
-     * Will return error code NS_ERROR_DOM_BAD_URI if the load request 
+     * Will return error code NS_ERROR_DOM_BAD_URI if the load request
      * should be denied.
      *
      * @param from the URI causing the load
      * @param uri the URI that is being loaded
      * @param flags the permission set, see above
      *
      * @deprecated Use checkLoadURIWithPrincipal instead of this function.
      */
-    void checkLoadURI(in nsIURI from, in nsIURI uri, 
-                      in unsigned long flags);
+    [deprecated] void checkLoadURI(in nsIURI from, in nsIURI uri,
+                                   in unsigned long flags);
 
     /**
      * Similar to checkLoadURIWithPrincipal but there are two differences:
      *
      * 1) The URI is a string, not a URI object.
      * 2) This function assumes that the URI may still be subject to fixup (and
      * hence will check whether fixed-up versions of the URI are allowed to
      * load as well); if any of the versions of this URI is not allowed, this
      * function will return error code NS_ERROR_DOM_BAD_URI.
      */
     void checkLoadURIStrWithPrincipal(in nsIPrincipal aPrincipal,
-                                      in AUTF8String uri, 
-                                      in unsigned long flags);     
-    
+                                      in AUTF8String uri,
+                                      in unsigned long flags);
+
     /**
      * Same as CheckLoadURI but takes string arguments for ease of use
      * by scripts
      *
      * @deprecated Use checkLoadURIStrWithPrincipal instead of this function.
      */
-    void checkLoadURIStr(in AUTF8String from, in AUTF8String uri, 
-                         in unsigned long flags);
+    [deprecated] void checkLoadURIStr(in AUTF8String from, in AUTF8String uri,
+                                      in unsigned long flags);
 
     /**
      * Check that the function 'funObj' is allowed to run on 'targetObj'
      *
      * Will return error code NS_ERROR_DOM_SECURITY_ERR if the function
      * should not run
      *
      * @param cx The current active JavaScript context.
@@ -168,20 +168,20 @@ interface nsIScriptSecurityManager : nsI
 
     /**
      * Return true if content from the given principal is allowed to
      * execute scripts.
      */
     [noscript] boolean canExecuteScripts(in JSContextPtr cx,
                                          in nsIPrincipal principal);
 
-    ///////////////// Principals /////////////////////// 
+    ///////////////// Principals ///////////////////////
     /**
-     * Return the principal of the innermost frame of the currently 
-     * executing script. Will return null if there is no script 
+     * Return the principal of the innermost frame of the currently
+     * executing script. Will return null if there is no script
      * currently executing.
      */
     [noscript] nsIPrincipal getSubjectPrincipal();
 
     /**
      * Return the all-powerful system principal.
      */
     nsIPrincipal getSystemPrincipal();
@@ -210,22 +210,22 @@ interface nsIScriptSecurityManager : nsI
     /**
      * Request that 'capability' can be enabled by scripts or applets
      * running with 'principal'. Will prompt user if
      * necessary. Returns nsIPrincipal::ENABLE_GRANTED or
      * nsIPrincipal::ENABLE_DENIED based on user's choice.
      */
     [noscript] short requestCapability(in nsIPrincipal principal,
                                        in string capability);
-    
+
     /**
      * Return true if the currently executing script has 'capability' enabled.
      */
     boolean isCapabilityEnabled(in string capability);
-    
+
     /**
      * Enable 'capability' in the innermost frame of the currently executing
      * script.
      */
     void enableCapability(in string capability);
 
     /**
      * Remove 'capability' from the innermost frame of the currently
@@ -244,17 +244,17 @@ interface nsIScriptSecurityManager : nsI
     /**
      * Allow 'certificateID' to enable 'capability.' Can only be performed
      * by code signed by the system certificate.
      */
     // XXXbz Capabilities can't have non-ascii chars?
     // XXXbz ideally we'd pass a subjectName here too, and the nsISupports
     // cert we're enabling for...
     void setCanEnableCapability(in AUTF8String certificateFingerprint,
-                                in string capability, 
+                                in string capability,
                                 in short canEnable);
 
     ///////////////////////
     /**
      * Return the principal of the specified object in the specified context.
      */
     [noscript] nsIPrincipal getObjectPrincipal(in JSContextPtr cx,
                                                in JSObjectPtr obj);