PluginViewerImpl::Init(nsIWidget* aParentWidget == check this parameter for null

VERIFIED FIXED in mozilla1.0

Status

()

P2
normal
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: srgchrpv, Assigned: srgchrpv)

Tracking

({crash})

Trunk
mozilla1.0
x86
All
crash
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ADT1 RTM][PL RTM][fix-trunk])

Attachments

(1 attachment)

664 bytes, patch
peterlubczynski-bugs
: review+
dbaron
: approval+
Details | Diff | Splinter Review
(Assignee)

Description

17 years ago
this particular checkin  for bug 52334
RCS file: /cvsroot/mozilla/docshell/base/nsDocShell.cpp,v
retrieving revision 1.446
...
@@ -4349,13 +4364,13 @@
 
     nsCOMPtr<nsIWidget> widget;
     NS_ENSURE_SUCCESS(GetMainWidget(getter_AddRefs(widget)), NS_ERROR_FAILURE);
-    if (!widget) {
-        NS_ERROR("GetMainWidget coughed up a null widget");
-        return NS_ERROR_FAILURE;
+
+    if (widget) {
+        NS_ENSURE_SUCCESS(EnsureDeviceContext(), NS_ERROR_FAILURE);
     }
     nsRect bounds(x, y, cx, cy);
-    NS_ENSURE_SUCCESS(EnsureDeviceContext(), NS_ERROR_FAILURE);
+
     if (NS_FAILED(mContentViewer->Init(widget, mDeviceContext, bounds))) {

are causing the crash in PluginViewerImpl::Init(nsIWidget* aParentWidget,
when *aParentWidget==null

there are several TB incidents with such crash:
Incident 6244440 - Stacktrace:
http://climate.mcom.com/reports/singleincidentinfo.cfm?dynamicBBID=6244440
    Email: kchen@mit.edu
Incident 6244469 - Stacktrace:
http://climate.mcom.com/reports/singleincidentinfo.cfm?dynamicBBID=6244469
    Email: kchen@mit.edu
Incident 6244663 - Stacktrace:
http://climate.mcom.com/reports/singleincidentinfo.cfm?dynamicBBID=6244663
    Email: kchen@mit.edu
Incident 6244687 - Stacktrace:
http://climate.mcom.com/reports/singleincidentinfo.cfm?dynamicBBID=6244687
    Email: kchen@mit.edu
---
the fix is abviuos:
cvs diff -u nsPluginViewer.cpp
Index: nsPluginViewer.cpp
===================================================================
RCS file: /cvsroot/mozilla/modules/plugin/base/src/nsPluginViewer.cpp,v
retrieving revision 1.115
diff -u -r1.115 nsPluginViewer.cpp
--- nsPluginViewer.cpp  20 May 2002 03:29:48 -0000      1.115
+++ nsPluginViewer.cpp  22 May 2002 21:59:01 -0000
@@ -323,6 +323,8 @@
                        nsIDeviceContext* aDeviceContext,
                        const nsRect& aBounds)
 {
+  NS_ENSURE_TRUE(aParentWidget, NS_ERROR_NULL_POINTER);
+
   nsresult rv = MakeWindow(aParentWidget->GetNativeData(NS_NATIVE_WIDGET),
    aDeviceContext, aBounds);
   if (NS_OK == rv) {
(Assignee)

Comment 1

17 years ago
Created attachment 84711 [details] [diff] [review]
patch v1

Updated

17 years ago
Keywords: crash
Priority: -- → P2
Whiteboard: [ADT1][PL RTM]
Target Milestone: --- → mozilla1.0

Comment 2

17 years ago
Comment on attachment 84711 [details] [diff] [review]
patch v1

r=peterl
Attachment #84711 - Flags: review+

Comment 3

17 years ago
Comment on attachment 84711 [details] [diff] [review]
patch v1

r=av
(Assignee)

Comment 4

17 years ago
Patrick, could you please sr=
Thanks.

Comment 5

17 years ago
Comment on attachment 84711 [details] [diff] [review]
patch v1

sr=beard
Attachment #84711 - Flags: superreview+
Nominating for nsbeta1+, as this has been marked as ADT1 RTM, and [PL RTM].
Blocks: 143047
Keywords: nsbeta1
Whiteboard: [ADT1][PL RTM] → [ADT1 RTM][PL RTM]
(Assignee)

Comment 7

17 years ago
on the trunk
mozilla/modules/plugin/base/src/nsPluginViewer.cpp,v  <--  nsPluginViewer.cpp
new revision: 1.116; previous revision: 1.115
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Whiteboard: [ADT1 RTM][PL RTM] → [ADT1 RTM][PL RTM][fix-trunk]
(Assignee)

Comment 8

17 years ago
nominating
Keywords: adt1.0.1

Updated

17 years ago
Keywords: nsbeta1 → mozilla1.0.1, nsbeta1+

Comment 9

17 years ago
adding adt1.0.1+.  Please get drivers approval before checking into the branch.
Keywords: adt1.0.1 → adt1.0.1+
(Assignee)

Comment 10

17 years ago
request for a= has been sent to drivers@mozilla.org 
on Mon, 10 Jun 2002 17:55:59
Comment on attachment 84711 [details] [diff] [review]
patch v1

Please land this on the 1.0.1 branch.  Once there, remove the
"mozilla1.0.1+" keyword, and add the "fixed1.0.1"
Attachment #84711 - Flags: approval+
(Assignee)

Comment 12

17 years ago
cheched in on MOZILLA_1_0_BRANCH
mozilla/modules/plugin/base/src/nsPluginViewer.cpp,v  <--  nsPluginViewer.cpp
new revision: 1.106.2.8; previous revision: 1.106.2.7
Keywords: mozilla1.0.1+ → mozilla1.0.1
added +
Keywords: mozilla1.0.1 → mozilla1.0.1+
(Assignee)

Updated

17 years ago
Keywords: fixed1.0.1

Updated

17 years ago
Keywords: mozilla1.0.1+

Comment 14

17 years ago
v
Status: RESOLVED → VERIFIED
Keywords: fixed1.0.1 → verified1.0.1
You need to log in before you can comment on or make changes to this bug.