Closed Bug 1195577 Opened 10 years ago Closed 10 years ago

Add JS_SetUntrustedPrincipals to mirror JS_SetTrustedPrincipals

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: fitzgen, Assigned: fitzgen)

References

Details

Attachments

(1 file)

Comment on attachment 8649024 [details] [diff] [review] Add JS_SetUntrustedPrincipals Review of attachment 8649024 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/public/Principals.h @@ +95,5 @@ > + * Just like the trusted principals, this principals is not held by the runtime, > + * so the embedder must ensure that `prin` outlives the runtime. > + */ > +extern JS_PUBLIC_API(void) > +JS_SetUntrustedPrincipals(JSRuntime* rt, JSPrincipals* prin); Bleh. Who started this 'prin' abbreviation thing? It's weird. (And not your problem.) ::: js/src/vm/Runtime.h @@ +1243,5 @@ > } > > private: > const JSPrincipals* trustedPrincipals_; > + JSPrincipals* untrustedPrincipals_; What's the state of the constness? It seems weird to have them be different here. I'm still voting for const with mutable refcount.
Attachment #8649024 - Flags: review?(sphink) → review+
(In reply to Steve Fink [:sfink, :s:] from comment #2) > ::: js/src/vm/Runtime.h > @@ +1243,5 @@ > > } > > > > private: > > const JSPrincipals* trustedPrincipals_; > > + JSPrincipals* untrustedPrincipals_; > > What's the state of the constness? It seems weird to have them be different > here. I'm still voting for const with mutable refcount. The trusted principals become non-const in part 3 of bug 1194424, but I rebased that series on top of this one.
After talking to bholley, we decided to go a different route in bug 1194424 rather than using trusted/untrusted principals.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: