Closed Bug 1695328 Opened 4 years ago Closed 4 years ago

PerformanceObserver should throw type errors instead of syntax errors

Categories

(Core :: Performance: General, defect)

defect

Tracking

()

RESOLVED FIXED
88 Branch
Performance Impact none
Tracking Status
firefox88 --- fixed

People

(Reporter: sefeng211, Assigned: sefeng211)

Details

Attachments

(1 file)

The latest spec indicates that type error should be thrown for performance observer https://w3c.github.io/performance-timeline/#observe-method. However, we throw syntax errors in our code.

According to the latest spec
https://w3c.github.io/performance-timeline/#observe-method,
TypeError should be thrown, however we throw SyntaxError.

Assignee: nobody → sefeng
Status: NEW → ASSIGNED
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60a3eddb183b PerformanceObserver should throw TypeError instead of SyntaxError r=smaug

Backed out for causing perma failures in PerformanceObserver.

Backout link: https://hg.mozilla.org/integration/autoland/rev/56a02be0b299b4333340050b9674d0ed71898f46

Push with failures

Failure log

INFO - TEST-PASS | dom/performance/tests/test_performance_observer.html | Expected 'TypeError', got 'TypeError'.
[task 2021-03-01T15:02:53.394Z] 15:02:53 INFO - Buffered messages finished
[task 2021-03-01T15:02:53.394Z] 15:02:53 INFO - TEST-UNEXPECTED-FAIL | dom/performance/tests/test_performance_observer.html | Expected 'SyntaxError', got 'TypeError'.
[task 2021-03-01T15:02:53.394Z] 15:02:53 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:417:16
[task 2021-03-01T15:02:53.394Z] 15:02:53 INFO - assert_throws@dom/performance/tests/test_performance_observer.html:79:7
[task 2021-03-01T15:02:53.394Z] 15:02:53 INFO - @dom/performance/tests/test_performance_observer.js:22:16
[task 2021-03-01T15:02:53.394Z] 15:02:53 INFO - promise_test/<@dom/performance/tests/test_performance_observer.html:25:13
[task 2021-03-01T15:02:53.394Z] 15:02:53 INFO - runNextTest@dom/performance/tests/test_performance_observer.html:54:17
[task 2021-03-01T15:02:53.394Z] 15:02:53 INFO - promise_test/<@dom/performance/tests/test_performance_observer.html:42:7
[task 2021-03-01T15:02:53.395Z] 15:02:53 INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-03-01T15:02:53.397Z] 15:02:53 INFO - TEST-UNEXPECTED-FAIL | dom/performance/tests/test_performance_observer.html | Expected 'SyntaxError', got 'TypeError'.
[task 2021-03-01T15:02:53.397Z] 15:02:53 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:417:16
[task 2021-03-01T15:02:53.397Z] 15:02:53 INFO - assert_throws@dom/performance/tests/test_performance_observer.html:79:7
[task 2021-03-01T15:02:53.397Z] 15:02:53 INFO - @dom/performance/tests/test_performance_observer.js:30:16
[task 2021-03-01T15:02:53.397Z] 15:02:53 INFO - promise_test/<@dom/performance/tests/test_performance_observer.html:25:13
[task 2021-03-01T15:02:53.397Z] 15:02:53 INFO - runNextTest@dom/performance/tests/test_performance_observer.html:54:17
[task 2021-03-01T15:02:53.397Z] 15:02:53 INFO - promise_test/<@dom/performance/tests/test_performance_observer.html:42:7

Flags: needinfo?(sefeng)
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d063cae49ad3 PerformanceObserver should throw TypeError instead of SyntaxError r=smaug
Flags: needinfo?(sefeng)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Performance Impact: --- → -
Whiteboard: [qf-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: