Closed Bug 980180 Opened 6 years ago Closed 6 years ago

remove principals as an argument to compilation

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: luke, Assigned: luke)

Details

Attachments

(2 files)

Everything in the same compartment has the same principals: compartment->principals.  Any compiled script is in cx->compartment.  Thus, having principals as an argument is strictly redundant.  We've had assertions on many paths that options.principals() == cx->compartment()->principals for a long time so it's time to remove all this.

28 files changed, 59 insertions(+), 285 deletions(-)
This patch removes the field from CompileOptions.  It also adds some asserts that 'principals == cx->compartment()->principals' on the few JSAPI paths that don't already have it so I can try-server to check: https://tbpl.mozilla.org/?tree=Try&rev=7828ece7e4fc
Assignee: nobody → luke
Status: NEW → ASSIGNED
Attachment #8386553 - Flags: review?(terrence)
This patch removes the Evaluate* JSAPIs that take an explicit JSPrincipal.
Attachment #8386554 - Flags: review?(terrence)
Comment on attachment 8386553 [details] [diff] [review]
rm-principal-arg1

Review of attachment 8386553 [details] [diff] [review]:
-----------------------------------------------------------------

Righteous! r=me
Attachment #8386553 - Flags: review?(terrence) → review+
Comment on attachment 8386554 [details] [diff] [review]
rm-principal-arg2

Review of attachment 8386554 [details] [diff] [review]:
-----------------------------------------------------------------

Epic! r=me
Attachment #8386554 - Flags: review?(terrence) → review+
https://hg.mozilla.org/mozilla-central/rev/3aa4c0b57f21
https://hg.mozilla.org/mozilla-central/rev/7fd4f489f0ab
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.