Closed Bug 1320199 Opened 7 years ago Closed 7 years ago

Add a function for throwing permission denied errors

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

Details

Attachments

(1 file)

We also have JSMSG_UNWRAP_DENIED, do you think I should change those to ReportAccessDenied as well?
Attachment #8814252 - Flags: review?(arai.unmht)
Comment on attachment 8814252 [details] [diff] [review]
Add ReportAccessDenied utility

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

I don't see any difference in the situations between "denied to access" and "denied to unwrap",
so it should be fine to merge them into ReportAccessDenied.

r+ excluding "global" cases below.

::: js/src/builtin/TestingFunctions.cpp
@@ +3122,4 @@
>      if (global) {
>          global = CheckedUnwrap(global);
>          if (!global) {
> +            ReportAccessDenied(cx);

I'm not sure if it's okay to change "global" to "object" here.
can you move this and other "global" case in this file to separated patch and ask review from who wrote them?

::: js/src/vm/TypedArrayObject.cpp
@@ +1167,4 @@
>      } else {
>          RootedObject unwrapped(cx, CheckedUnwrap(other));
>          if (!unwrapped) {
> +            ReportOutOfMemory(cx);

ReportAccessDenied
Attachment #8814252 - Flags: review?(arai.unmht) → review+
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9ce6e0f0095e
Add a function for throwing permission denied errors. r=arai
https://hg.mozilla.org/mozilla-central/rev/9ce6e0f0095e
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: