SimpleTest.js repr() causes a JS error and makes is() slow

RESOLVED FIXED in mozilla9

Status

defect
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

Tracking

unspecified
mozilla9
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Posted patch Simple fix (obsolete) — Splinter Review
Line 51: reprRegistry.match(o); is calling match() on an empty Array and is triggering js_ReportIsNotFunction.

This appears to be painfully slow because of bug 676934.

I've attached a simple fix that just removes this broken check. This takes the runtime of layout/style/test/test_transitions_per_property.html from almost 3 minutes, down to 1 minute on my computer.
Attachment #556449 - Flags: review?(mdas)
Comment on attachment 556449 [details] [diff] [review]
Simple fix

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

Great catch, and thanks for the patch, it looks good.

::: testing/mochitest/tests/SimpleTest/SimpleTest.js
@@ +55,1 @@
>          } catch (e) {

Do you think you can add a comment here about why we don't grab the stack trace and the related bug number? It would deter people from doing this in the future.
Attachment #556449 - Flags: review?(mdas) → review+
Posted patch Simple fix v2Splinter Review
Looks like that bug has landed now, so theres no reason to remove the catch{} block.

Changed the patch to just remove the reprRegistry code that was causing the actual error.
Attachment #556449 - Attachment is obsolete: true
Attachment #557072 - Flags: review?
Attachment #557072 - Flags: review? → review?(mdas)
Comment on attachment 557072 [details] [diff] [review]
Simple fix v2

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

Looks good!
Attachment #557072 - Flags: review?(mdas) → review+
http://hg.mozilla.org/mozilla-central/rev/2bf8e6118af4
Assignee: nobody → matt.woodrow
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.