Closed
Bug 333312
Opened 19 years ago
Closed 19 years ago
[@ JS_GetGlobalObject - nsHTTPIndex::OnFTPControlLog]
Categories
(Core :: Networking: FTP, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.8.1beta1
People
(Reporter: timeless, Assigned: Gavin)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity, crash, fixed1.8.1)
Crash Data
Attachments
(1 file)
(deleted),
patch
|
timeless
:
review+
jag+mozilla
:
superreview+
neil
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
found by coverity
the jscontext null check should happen before the JS_GetGlobalObject call, not after it :(.
Updated•19 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 1•19 years ago
|
||
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #217775 -
Flags: superreview?(jag)
Attachment #217775 -
Flags: review?(timeless)
Comment on attachment 217775 [details] [diff] [review]
patch
>Index: xpfe/components/directory/nsDirectoryViewer.cpp
>@@ -185,21 +185,21 @@ nsHTTPIndex::OnFTPControlLog(PRBool serv
> nsCOMPtr<nsIScriptGlobalObject> scriptGlobal(do_GetInterface(mRequestor));
> NS_ENSURE_TRUE(scriptGlobal, NS_OK);
>
> nsIScriptContext *context = scriptGlobal->GetContext();
> NS_ENSURE_TRUE(context, NS_OK);
>
> JSContext* jscontext = NS_REINTERPRET_CAST(JSContext*,
> context->GetNativeContext());
>+ NS_ENSURE_TRUE(jscontext, NS_OK);
>
> JSObject* global = JS_GetGlobalObject(jscontext);
>+ NS_ENSURE_TRUE(global, NS_OK);
ensure_ macros will complain on failure, so if these are normal cases, we should probably use simple returns instead.
but it's definitely in file style
Attachment #217775 -
Flags: review?(timeless) → review+
Assignee | ||
Comment 3•19 years ago
|
||
I don't think any of them are normal cases.
Updated•19 years ago
|
Attachment #217775 -
Flags: superreview?(jag) → superreview+
Assignee | ||
Updated•19 years ago
|
Whiteboard: [checkin needed]
Assignee | ||
Comment 4•19 years ago
|
||
mozilla/xpfe/components/directory/nsDirectoryViewer.cpp 1.124
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
OS: Linux → All
Hardware: PC → All
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Updated•19 years ago
|
Attachment #217775 -
Flags: approval-branch-1.8.1?(neil)
Updated•19 years ago
|
Attachment #217775 -
Flags: approval-branch-1.8.1?(neil) → approval-branch-1.8.1+
Assignee | ||
Updated•19 years ago
|
Whiteboard: [checkin needed (1.8 branch)]
Assignee | ||
Comment 5•19 years ago
|
||
mozilla/xpfe/components/directory/nsDirectoryViewer.cpp 1.120.16.1
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)]
Target Milestone: mozilla1.9alpha → mozilla1.8.1beta1
Version: Trunk → 1.8 Branch
Updated•14 years ago
|
Crash Signature: [@ JS_GetGlobalObject - nsHTTPIndex::OnFTPControlLog]
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•