Add a function for throwing permission denied errors

RESOLVED FIXED in Firefox 53

Status

()

Core
JavaScript Engine
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: evilpie, Assigned: evilpie)

Tracking

unspecified
mozilla53
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Created attachment 8814252 [details] [diff] [review]
Add ReportAccessDenied utility

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+

Comment 2

2 years ago
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9ce6e0f0095e
Add a function for throwing permission denied errors. r=arai

Comment 3

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/9ce6e0f0095e
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.