Closed Bug 1123140 Opened 9 years ago Closed 9 years ago

Minor ScriptedDirectProxy cleanup

Categories

(Core :: JavaScript: Standard Library, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: evilpie, Assigned: evilpie)

Details

Attachments

(1 file)

Attached patch cleanupSplinter Review
      No description provided.
Attachment #8550987 - Flags: review?(efaustbmo)
Assignee: nobody → evilpies
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
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: