Closed
Bug 485834
Opened 15 years ago
Closed 15 years ago
ObserverService shouldn't recurse infinitely for stupid consumers
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
References
Details
(Keywords: crash)
Attachments
(1 file)
492 bytes,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
So, bug 325392 shows an example of a stupid consumer. NS_IMPL_ISUPPORTS1(nsBroken, nsIObserver) nsBroken::nsBroken() { nsCOMPtr<nsIObserverService> os(do_GetService("@mozilla.org/observer-service;1")); os->AddObserver(this, "stupid", PR_FALSE); } nsBroken::~nsBroken() { nsCOMPtr<nsIObserverService> os(do_GetService("@mozilla.org/observer-service;1")); os->RemoveObserver(this, "stupid"); } NS_IMETHODIMP nsBroken::Observe( nsISupports* subject, const char* topic, const PRUnichar* data_unicode) { return NS_OK; }
Attachment #369926 -
Flags: review?(ted.mielczarek)
Comment 1•15 years ago
|
||
Comment on attachment 369926 [details] [diff] [review] protect against stupidity I am not qualified to review this.
Attachment #369926 -
Flags: review?(ted.mielczarek)
Comment 2•15 years ago
|
||
dougt maybe?
Comment 3•15 years ago
|
||
Comment on attachment 369926 [details] [diff] [review] protect against stupidity add a comment to the reason you need the death grip.
Attachment #369926 -
Flags: review+
Updated•15 years ago
|
Whiteboard: [timeless: need patch addressing comment 3]
http://hg.mozilla.org/mozilla-central/rev/9b612b23ae16
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [timeless: need patch addressing comment 3]
You need to log in
before you can comment on or make changes to this bug.
Description
•