Closed Bug 358723 Opened 14 years ago Closed 14 years ago
Crashes [@ ns
According to TB there are some FF2 crashes @ nsHTMLDocument::GetCookie. nsHTMLDocument::GetCookie [mozilla/content/html/document/src/nsHTMLDocument.cpp, line 1829] XPTC_InvokeByIndex [mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp, line 102] XPCWrappedNative::CallMethod [mozilla/js/src/xpconnect/src/xpcwrappednative.cpp, line 2169] XPC_WN_GetterSetter [mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp, line 1487] js_Invoke [mozilla/js/src/jsinterp.c, line 1377] I wonder in which case mPrincipal is null? http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/html/document/src/nsHTMLDocument.cpp&mark=1829&rev=MOZILLA_1_8_BRANCH#1829
Btw, most of the crash reports mention http://earth.google.com/earth.html or other google earth pages.
> I wonder in which case mPrincipal is null? When it feels like -- mPrincipal is lazily allocated on the 1.8 branch. All consumers should be calling GetPrincipal(), then null-checking the result and throwing OOM if it's null.
(In reply to comment #2) > When it feels like -- mPrincipal is lazily allocated on the 1.8 branch. All > consumers should be calling GetPrincipal(), then null-checking the result and > throwing OOM if it's null. > Ah, ok. I can then take this and fix also other cases when principal isn't used properly.
Assignee: general → Olli.Pettay
(In reply to comment #2)then null-checking the result and > throwing OOM if it's null. > Not necessarily OOM, as far as I see. It may fail also during shutdown.
Comment on attachment 244094 [details] [diff] [review] use GetPrincipal Looks great. r+sr=bzbarsky
Note, this is not needed for trunk, because NodePrincipal() is used there.
Comment on attachment 244094 [details] [diff] [review] use GetPrincipal approved for 1.8 branch, a=dveditz for drivers
Attachment #244094 - Flags: approval220.127.116.11? → approval18.104.22.168+
--> RESOLVED FIXED?
Yes, this should be fixed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Does anyone have a simplified testcase or steps to reproduce this crash? Would be nice to verify the fix...
Whiteboard: [need testcase]
All we have is talkback data...
You need to log in before you can comment on or make changes to this bug.