Treat false return value from certain Proxy handler methods as failure

RESOLVED FIXED in Firefox 39

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jorendorff, Assigned: jorendorff)

Tracking

({dev-doc-complete, site-compat})

unspecified
mozilla39
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox39 fixed)

Details

Attachments

(2 attachments)

Split off from bug 1113369 which introduces these boolean "strict mode failure" return values everywhere.

Implementing this for scripted proxies turns out to break a lot of code, so it may be a gut check landing it.
Assignee

Updated

4 years ago
Assignee: nobody → jorendorff
Status: NEW → ASSIGNED
Attachment #8564256 - Flags: review?(efaustbmo) → review+
Comment on attachment 8564257 [details] [diff] [review]
part 2 - Treat false return from proxyHandler.set() as strict mode failure

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

Looks good.

::: js/src/tests/ecma_6/TypedArray/from_proxy.js
@@ +17,5 @@
>          log.push("target", target);
>          var h = {
>              defineProperty: function (t, id) {
>                  log.push("define", id);
> +                return true;

shouldn't this be in the other patch?
Attachment #8564257 - Flags: review?(efaustbmo) → review+
Assignee

Comment 4

4 years ago
(In reply to Eric Faust [:efaust] from comment #3)
> part 2 - Treat false return from proxyHandler.set() as strict mode failure
> >              defineProperty: function (t, id) {
> >                  log.push("define", id);
> > +                return true;
> 
> shouldn't this be in the other patch?

Yeah, but it's never called, so it doesn't matter. :)

Comment 7

4 years ago
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/46de54aebe951b0c8335b0f7c5894fc5baf1b669
Update proxy handler for ES6

See [bug 1132522](https://bugzilla.mozilla.org/show_bug.cgi?id=1132522).

We definitely need this particular change. I'm about 95% sure this is the only one, since we won't be changing the behavior of legacy Proxy.create() proxies.

https://github.com/mozilla/addon-sdk/commit/4694b75478a49edc9362f25fcfa2dac07c44ec84
Merge pull request #1888 from jorendorff/patch-1

Bug 1132522 - Update proxy handlers in the Addon SDK for ES6 error handling. r=Mossop
OS: Linux → All
Hardware: x86_64 → All
https://hg.mozilla.org/mozilla-central/rev/f2a7b760ad5c
https://hg.mozilla.org/mozilla-central/rev/911612d952e6
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.