Closed
Bug 721627
Opened 12 years ago
Closed 12 years ago
Don't return nsRefPtr/nsCOMPtr from nsDisplayImage
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla12
People
(Reporter: roc, Assigned: roc)
Details
Attachments
(2 files)
3.90 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
5.21 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #592037 -
Flags: review?(matspal)
Comment 2•12 years ago
|
||
Comment on attachment 592037 [details] [diff] [review] fix r=mats
Attachment #592037 -
Flags: review?(matspal) → review+
Assignee | ||
Updated•12 years ago
|
Attachment #592037 -
Flags: checkin?
Assignee | ||
Comment 3•12 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/eb80ab6ee07b
Assignee | ||
Updated•12 years ago
|
Attachment #592037 -
Flags: checkin?
Assignee | ||
Comment 4•12 years ago
|
||
Backed out: https://hg.mozilla.org/integration/mozilla-inbound/rev/d68b6a9939d8
Assignee | ||
Comment 5•12 years ago
|
||
This seems to have a caused crashes, e.g. https://tbpl.mozilla.org/php/getParsedLog.php?id=8897664&tree=Mozilla-Inbound&full=1#error1 PROCESS-CRASH | file:///home/cltbld/talos-slave/test/build/reftest/tests/layout/reftests/bugs/641770-1.html | application crashed (minidump found) 0 libxul.so!mozilla::layers::ImageLayer::ComputeEffectiveTransforms [ImageLayers.h : 355 + 0x1b] eip = 0x020e3a19 esp = 0xbfef62c0 ebp = 0xbfef6408 ebx = 0x02b339e8 esi = 0x095a8adc edi = 0x095a89d8 eax = 0x0afcfd00 ecx = 0xbfef6328 edx = 0x00000000 efl = 0x00010206 Found by: given as instruction pointer in context 1 libxul.so!mozilla::layers::ContainerLayer::ComputeEffectiveTransformsForChildren [Layers.cpp : 489 + 0x8] eip = 0x020eb884 esp = 0xbfef6410 ebp = 0xbfef6428 ebx = 0x02b339e8 esi = 0x095a89d8 edi = 0xbfef64e0 Found by: call frame info
Assignee | ||
Comment 6•12 years ago
|
||
Looks like a dangling pointer...
Assignee | ||
Comment 7•12 years ago
|
||
Aha, RasterImage (contrary to XPCOM rules) doesn't addref its out parameter.
Assignee | ||
Comment 8•12 years ago
|
||
Addref in RasterImage::GetImageContainer
Attachment #592371 -
Flags: review?(joe)
Comment 9•12 years ago
|
||
Comment on attachment 592371 [details] [diff] [review] fix v2 Review of attachment 592371 [details] [diff] [review]: ----------------------------------------------------------------- ::: image/src/RasterImage.cpp @@ +950,5 @@ > (mImageContainer->Manager() == aManager || > (!mImageContainer->Manager() && > (mImageContainer->GetBackendType() == aManager->GetBackendType())))) { > *_retval = mImageContainer; > + NS_ADDREF(*_retval); _yikes_. Who reviewed this originally anyways :) ::: layout/generic/nsImageFrame.cpp @@ +1215,5 @@ > { > + nsRefPtr<ImageContainer> container; > + nsresult rv = mImage->GetImageContainer(aManager, getter_AddRefs(container)); > + NS_ENSURE_SUCCESS(rv, nsnull); > + return container.forget(); If you feel like it you could just return container.forget() here, since it will be NULL if it fails.
Attachment #592371 -
Flags: review?(joe) → review+
Assignee | ||
Comment 10•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f7d9a6ddddfe
Comment 11•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f7d9a6ddddfe
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in
before you can comment on or make changes to this bug.
Description
•