Last Comment Bug 685372 - type inference changes GC edge names; findReferences tests need to be updated
: type inference changes GC edge names; findReferences tests need to be updated
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla9
Assigned To: general
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-07 16:59 PDT by Jim Blandy :jimb
Modified: 2011-09-10 08:34 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Update object -> prototype GC edge names in findReferences tests. (1.61 KB, patch)
2011-09-07 16:59 PDT, Jim Blandy :jimb
jorendorff: review+
Details | Diff | Splinter Review

Description Jim Blandy :jimb 2011-09-07 16:59:28 PDT
Created attachment 559004 [details] [diff] [review]
Update object -> prototype GC edge names in findReferences tests.

Some tests have been failing since TI landed:

    js1_8_5/extensions/findReferences-01.js
    js1_8_5/extensions/findReferences-02.js

These are tests based on the new 'findReferences' function I added to the shell, which tests can use to directly check whether a given GC edge from one object to another is present in the heap. The edges' names reveal implementation details; I don't know how to avoid this without forcing tests to engage in even more implementation-sensitive behavior like counting the number of live heap objects, or hoping weak references turn null at a given point.

This means that the findReferences tests will tend to fail as the internal structure of the heap graph changes --- as with TI's prototype -> type change. The tests print messages like this when they fail:

  referent is not referenced via: "edge: type_proto"
  but it is referenced via:       ["edge: type; type_proto"]

to make updating the tests easier.
Comment 1 Jason Orendorff [:jorendorff] 2011-09-09 12:10:13 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/70dc8862965e
Comment 2 Jim Blandy :jimb 2011-09-09 12:30:50 PDT
... I could have sworn I'd landed this. Thanks!
Comment 3 Justin Wood (:Callek) 2011-09-09 22:41:00 PDT
(In reply to Jason Orendorff [:jorendorff] from comment #1)
> http://hg.mozilla.org/integration/mozilla-inbound/rev/70dc8862965e

and now on m-c

Note You need to log in before you can comment on or make changes to this bug.