The default bug view has changed. See this FAQ.

js::types::TypeConstraintSubsetBarrier::newType makes useless call to target->addType

RESOLVED FIXED in mozilla10

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jimb, Assigned: jimb)

Tracking

unspecified
mozilla10
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Created attachment 565630 [details] [diff] [review]
Delete useless call to target->addType in js::types::TypeConstraintSubsetBarrier::newType.

js::types::TypeConstraintSubsetBarrier::newType calls 'target->hasType(type)', and if that returns true, calls 'target->addType(cx, type)'. That second call should have no effect: it just adds to target a type that it already has.

The call to target->addType should be deleted.

The attached patch causes no regressions in jit-test and js-tests on Linux in DEBUG mode.
Attachment #565630 - Flags: review?(bhackett1024)
(Assignee)

Comment 1

6 years ago
Created attachment 565633 [details] [diff] [review]
Delete useless call to target->addType in js::types::TypeConstraintSubsetBarrier::newType.

Trivial revision to patch, to clean things up a bit better.
Assignee: general → jimb
Attachment #565630 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #565630 - Flags: review?(bhackett1024)
Attachment #565633 - Flags: review?(bhackett1024)
Attachment #565630 - Flags: review+
Attachment #565633 - Flags: review?(bhackett1024) → review+
(Assignee)

Comment 2

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/6576946586f4
(Assignee)

Updated

6 years ago
Whiteboard: [inbound]
https://hg.mozilla.org/mozilla-central/rev/6576946586f4
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
https://hg.mozilla.org/mozilla-central/rev/26ac81280f33
https://hg.mozilla.org/mozilla-central/rev/767693e248aa

were for bug 692991.
Whiteboard: [inbound]
You need to log in before you can comment on or make changes to this bug.