Closed Bug 874103 Opened 11 years ago Closed 11 years ago

Rename StringWrapper to avoid aliasing another struct for the static rooting analysis

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: sfink, Assigned: sfink)

Details

Attachments

(1 file)

From bz:


I'm looking at the browser rooting stuff, and there are 4 hazards in storage/test/test_StatementCache.cpp  that look like this:

Function 'void test_GetCachedStatement() [with StringType = StringWrapper]' has unrooted 'sql' of type 'StringWrapper' live across GC call mozIStorageBaseStatement.GetState at storage/test/test_StatementCache.cpp:66

But 'StringWrapper' has nothing to do with JS GC, or with JS at all.  It looks like this:

  class StringWrapper : public nsCString
  {
  public:
    StringWrapper(const char* aOther)
    {
      this->Assign(aOther);
    }
  };

so I'm not sure why the rooting analysis cares about it at all.
Comment on attachment 751736 [details] [diff] [review]
Rename StringWrapper to avoid aliasing another struct for the static rooting analysis

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

Silly, but r=me nonetheless.
Attachment #751736 - Flags: review?(terrence) → review+
Attachment #751736 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/1d14e9de6418
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: