Summary: | konqueror crashed when pressing back | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Thorsten Staerk <dev> |
Component: | khtml | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | finex, frank78ac, maksim |
Priority: | NOR | Keywords: | needs_verification |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Thorsten Staerk
2006-07-22 13:02:54 UTC
Confirmed, r565066 SVN commit 565178 by orlovich: Put in a safe workaround for #127147, and likely #131199. This isn't the correct fix, but it'll at least prevent crashing and log the actual bug; the real fix is too complicated to do in time for 3.5.4. CCBUG:127147 CCBUG:131199 M +17 -13 kjs_window.cpp --- branches/KDE/3.5/kdelibs/khtml/ecma/kjs_window.cpp #565177:565178 @@ -2237,20 +2237,24 @@ // hence, it can find non-frame things (and even let them hide frame ones!) // We don't quite do that, but do this as a fallback. DOM::DocumentImpl* doc = static_cast<DOM::DocumentImpl*>(part->document().handle()); - DOM::HTMLCollectionImpl docuAll(doc, DOM::HTMLCollectionImpl::DOC_ALL); - DOM::NodeImpl* node = docuAll.namedItem(p.string()); - if (node) { - if (node->id() == ID_FRAME || node->id() == ID_IFRAME) { - //Return the Window object. - KHTMLPart* part = static_cast<DOM::HTMLFrameElementImpl*>(node)->contentPart(); - if (part) - return Value(Window::retrieveWindow(part)); - else - return Undefined(); - } else { - //Just a regular node.. - return getDOMNode(exec, node); + if (doc) { + DOM::HTMLCollectionImpl docuAll(doc, DOM::HTMLCollectionImpl::DOC_ALL); + DOM::NodeImpl* node = docuAll.namedItem(p.string()); + if (node) { + if (node->id() == ID_FRAME || node->id() == ID_IFRAME) { + //Return the Window object. + KHTMLPart* part = static_cast<DOM::HTMLFrameElementImpl*>(node)->contentPart(); + if (part) + return Value(Window::retrieveWindow(part)); + else + return Undefined(); + } else { + //Just a regular node.. + return getDOMNode(exec, node); + } } + } else { + kdWarning(6070) << "Missing own document in FrameArray::get()" << endl; } return ObjectImp::get(exec, p); Thanks a lot, Maxim! KDE 3.5.4 will rock! I tried it out, the crash no longer occurs. ...and your name is Maksim. Sorry, Maksim. Maksim, can we mark this as fixed or is there a reason you didn't do it? Doesn't really matter, either way --- the underlying issue is still there, but there are other reports that deal with it, e.g. bug #166056 As bug #166056 has been closed, can this be closed too? It is no more reproducible. This bug is not assigned to anyone and has no votes. So it is not important to anyone. As I am the reporter - I confirmed it to be fixed. |