~ubuntu-branches/ubuntu/intrepid/xulrunner-1.9/intrepid-security

« back to all changes in this revision

Viewing changes to mozilla/caps/include/nsScriptSecurityManager.h

  • Committer: Bazaar Package Importer
  • Author(s): Micah Gersten
  • Date: 2010-02-14 16:55:40 UTC
  • mfrom: (1.2.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20100214165540-toqlunp37nl3dqic
Tags: 1.9.0.18+build1+nobinonly-0ubuntu0.8.10.1
* New upstream release v1.9.0.18 (FIREFOX_3_0_18_BUILD1)
  - see USN-895-1 

Show diffs side-by-side

added added

removed removed

Lines of Context:
368
368
{ 0x7ee2a4c0, 0x4b93, 0x17d3, \
369
369
{ 0xba, 0x18, 0x00, 0x60, 0xb0, 0xf1, 0x99, 0xa2 }}
370
370
 
371
 
class nsScriptSecurityManager : public nsIScriptSecurityManager_1_9_0_BRANCH,
 
371
class nsScriptSecurityManager : public nsIScriptSecurityManager_1_9_2,
372
372
                                public nsIPrefSecurityCheck,
373
373
                                public nsIChannelEventSink,
374
374
                                public nsIObserver
381
381
    NS_DECL_ISUPPORTS
382
382
    NS_DECL_NSISCRIPTSECURITYMANAGER
383
383
    NS_DECL_NSISCRIPTSECURITYMANAGER_1_9_0_BRANCH
 
384
    NS_DECL_NSISCRIPTSECURITYMANAGER_1_9_2
384
385
    NS_DECL_NSIXPCSECURITYMANAGER
385
386
    NS_DECL_NSIPREFSECURITYCHECK
386
387
    NS_DECL_NSICHANNELEVENTSINK
483
484
    // Returns null if a principal cannot be found.  Note that rv can be NS_OK
484
485
    // when this happens -- this means that there was no script for the
485
486
    // context.  Callers MUST pass in a non-null rv here.
486
 
    static nsIPrincipal*
 
487
    nsIPrincipal*
487
488
    GetSubjectPrincipal(JSContext* cx, nsresult* rv);
488
489
 
489
490
    // Returns null if a principal cannot be found.  Note that rv can be NS_OK
490
491
    // when this happens -- this means that there was no script for the frame.
491
492
    // Callers MUST pass in a non-null rv here.
492
 
    static nsIPrincipal*
 
493
    nsIPrincipal*
493
494
    GetFramePrincipal(JSContext* cx, JSStackFrame* fp, nsresult* rv);
494
 
                                                     
 
495
 
495
496
    // Returns null if a principal cannot be found.  Note that rv can be NS_OK
496
497
    // when this happens -- this means that there was no script.  Callers MUST
497
498
    // pass in a non-null rv here.
511
512
    // Returns null if a principal cannot be found.  Note that rv can be NS_OK
512
513
    // when this happens -- this means that there was no script
513
514
    // running.  Callers MUST pass in a non-null rv here.
514
 
    static nsIPrincipal*
 
515
    nsIPrincipal*
515
516
    GetPrincipalAndFrame(JSContext *cx,
516
517
                         JSStackFrame** frameResult,
517
518
                         nsresult* rv);
565
566
    PrintPolicyDB();
566
567
#endif
567
568
 
 
569
    struct ContextPrincipal {
 
570
        ContextPrincipal(ContextPrincipal *next, JSContext *cx,
 
571
                         JSStackFrame *fp, nsIPrincipal *principal)
 
572
            : mNext(next), mCx(cx), mFp(fp), mPrincipal(principal) {}
 
573
 
 
574
        ContextPrincipal *mNext;
 
575
        JSContext *mCx;
 
576
        JSStackFrame *mFp;
 
577
        nsCOMPtr<nsIPrincipal> mPrincipal;
 
578
    };
 
579
 
568
580
    // JS strings we need to clean up on shutdown
569
581
    static jsval sEnabledID;
570
582
 
585
597
    nsCOMPtr<nsIPrincipal> mSystemCertificate;
586
598
    nsInterfaceHashtable<PrincipalKey, nsIPrincipal> mPrincipals;
587
599
    nsCOMPtr<nsIThreadJSContextStack> mJSContextStack;
 
600
    ContextPrincipal *mContextPrincipals;
588
601
    PRPackedBool mIsJavaScriptEnabled;
589
602
    PRPackedBool mIsMailJavaScriptEnabled;
590
603
    PRPackedBool mIsWritingPrefs;