Closed Bug 1052358 Opened 5 years ago Closed 5 years ago

Support symbol properties in Object.assign

Categories

(Core :: JavaScript Engine, defect)

32 Branch
x86
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: bruant.d, Assigned: nathan)

References

Details

Attachments

(1 file, 1 obsolete file)

No longer blocks: 937855
Blocks: 937855
Ok, fixed Object.assign to use a new self-hosted intrinsic - OwnPropertyKeys - which will return symbols as well. Also added a test.
Assignee: nobody → miloignis
Status: NEW → ASSIGNED
Attachment #8471795 - Flags: review?(jwalden+bmo)
Comment on attachment 8471795 [details] [diff] [review]
fixed_added_OwnPropertyKeys_and_test.patch

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

::: js/src/builtin/Object.cpp
@@ +946,5 @@
>  
>      args.rval().setObject(*aobj);
>      return true;
>  }
> +} // namespace js

Blank lines at start and end of namespace block, please.

namespace js {

/* ES6 draft... */
...
}

} // namespace js

::: js/src/vm/SelfHosting.cpp
@@ +118,5 @@
> +{
> +    CallArgs args = CallArgsFromVp(argc, vp);
> +    return GetOwnPropertyKeys(cx, args,
> +                              JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS,
> +                              "OwnPropertyKeys");

This last argument isn't a good name.  But then again, it doesn't matter -- this argument goes entirely unused in GOPK.  Please just remove the argument and adjust callers as necessary.
Attachment #8471795 - Flags: review?(jwalden+bmo) → review+
Made review changes.
Attachment #8471795 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/cd27648dc4a7
https://hg.mozilla.org/mozilla-central/rev/8b0121d2a03a
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Flags: qe-verify-
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.