Closed Bug 692911 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: jimb, Assigned: jimb)

Details

Attachments

(1 file, 1 obsolete file)

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)
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+
Whiteboard: [inbound]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: