Minor ScriptedDirectProxy cleanup

RESOLVED FIXED in mozilla38

Status

()

Core
JavaScript: Standard Library
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: evilpie, Assigned: evilpie)

Tracking

Trunk
mozilla38
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8550987 [details] [diff] [review]
cleanup
Attachment #8550987 - Flags: review?(efaustbmo)
(Assignee)

Updated

3 years ago
Assignee: nobody → evilpies

Comment 1

3 years ago
Comment on attachment 8550987 [details] [diff] [review]
cleanup

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

Yep.

::: js/src/proxy/ScriptedDirectProxyHandler.cpp
@@ +684,5 @@
>      // Here we add a bunch of extra sanity checks. It is unclear if they will also appear in
>      // the spec. See step 10-11
>      return ArrayToIdVector(cx, proxy, target, trapResult, props,
>                             JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS,
> +                           cx->names().ownKeys);

OOPS! Nice.

@@ +785,5 @@
>          return false;
>  
>      // step 10
>      if (trapResult.isPrimitive()) {
> +        ReportInvalidTrapResult(cx, proxy, cx->names().enumerate);

Surprised there aren't more of these around.

@@ +1019,5 @@
>      }
>  
>      // step 3
>      RootedObject target(cx, proxy->as<ProxyObject>().target());
> +    MOZ_ASSERT(target->isCallable());

Better than a comment, to be sure.
Attachment #8550987 - Flags: review?(efaustbmo) → review+
https://hg.mozilla.org/mozilla-central/rev/9fe6eb98ef8c
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.