Closed Bug 1749477 Opened 3 years ago Closed 3 years ago

Array.prototype.groupBy should return an object with a null prototype

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: evilpies, Assigned: yulia)

References

Details

Attachments

(2 files)

The spec steps and JS implementation don't seem to match:

/* Step 7. Let obj be ! OrdinaryObjectCreate(null). */
var object = {};

I think this should be std_Object_create(null) or maybe {__proto__: null}, but I don't remember if that works.

Flags: needinfo?(rolf.martin)

Ah, this is my oversight. I think Rolf and Sigurd are on to other things, but I will check with them and if they don't have time I will take this.

Flags: needinfo?(rolf.martin)
Flags: needinfo?(ystartsev)
Assignee: nobody → ystartsev
Status: NEW → ASSIGNED
Flags: needinfo?(ystartsev)
Pushed by ystartsev@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/faf29999cc23 change array groupby to create a null prototype object; r=evilpie https://hg.mozilla.org/integration/autoland/rev/d63e96d23111 new array methods should be unscopable; r=evilpie

Backed out for causing reftest failures on unscopables.js

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: REFTEST TEST-UNEXPECTED-FAIL | js/src/tests/non262/Array/unscopables.js | Unknown file:///builds/worker/workspace/build/tests/jsreftest/tests/js/src/tests/non262/shell.js:188: Error: Assertion failed: got "values", expected "includes" at _[10] item 1
Flags: needinfo?(ystartsev)
Flags: needinfo?(ystartsev)
Severity: -- → N/A
Priority: -- → P1
Pushed by ystartsev@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6a3f29f8f8dd change array groupby to create a null prototype object; r=evilpie https://hg.mozilla.org/integration/autoland/rev/0129cf4c1485 new array methods should be unscopable; r=evilpie
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: