Closed Bug 944491 Opened 11 years ago Closed 11 years ago

Add null-checking asserts to GetGCThingRuntime and GetGCThingMarkBitmap

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: mccr8, Assigned: mccr8)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

While working on bug 942528, I was getting weird near-NULL crashes in ExposeObjectToActiveJS, which I think was from passing in NULL pointers. I can imagine calling GetGCThingRuntime on a null pointer results in something bad, so I think it would be useful to add a null checking assert to it.
Comment on attachment 8340084 [details] [diff] [review] Add null-checking assert to GetGCThingRuntime. r=jonco Review of attachment 8340084 [details] [diff] [review]: ----------------------------------------------------------------- Fair enough, it would be more obvious what went wrong if we had this assertion. While you're there, can you add one to GetGCThingMarkBitmap() above too?
Attachment #8340084 - Flags: review?(jcoppeard) → review+
Yeah, good point. For some reason I'd convinced myself that we'd hit other null check guards before we called that method, but that's not actually the case. https://hg.mozilla.org/integration/mozilla-inbound/rev/c120711ba3ca
Summary: Add null-checking assert to GetGCThingRuntime → Add null-checking asserts to GetGCThingRuntime and GetGCThingMarkBitmap
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: