[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.1/kdelibs/khtml
From: Maks Orlovich <maksim () kde ! org>
Date: 2008-08-06 23:30:19
Message-ID: 1218065419.976173.26302.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 843330 by orlovich:
Remove some pointless refcount thrashing in some hot methods.
This is theoretically a bit of a speedup, but I am really
doing this because it makes serious leak debugging easier.
M +9 -9 ecma/kjs_window.cpp
M +3 -4 khtml_part.cpp
--- branches/KDE/4.1/kdelibs/khtml/ecma/kjs_window.cpp #843329:843330
@@ -756,13 +756,13 @@
case Status:
return jsString(UString(part->jsStatusBarText()));
case Document:
- if (part->document().isNull()) {
+ if (!part->xmlDocImpl()) {
kDebug(6070) << "Document.write: adding <HTML><BODY> to create document";
part->begin();
part->write("<HTML><BODY>");
part->end();
}
- return getDOMNode(exec,part->document().handle());
+ return getDOMNode(exec, part->xmlDocImpl());
case FrameElement:
if (m_frame->m_partContainerElement)
return getDOMNode(exec,m_frame->m_partContainerElement);
@@ -1328,11 +1328,11 @@
if (!part)
return true; // not a KHTMLPart
- if ( part->document().isNull() )
+ if ( !part->xmlDocImpl() )
return true; // allow to access a window that was just created (e.g. with \
window.open("about:blank"))
- DOM::HTMLDocument thisDocument = part->htmlDocument();
- if ( thisDocument.isNull() ) {
+ DOM::HTMLDocumentImpl* thisDocument = part->docImpl();
+ if ( !thisDocument ) {
kDebug(6070) << "Window::isSafeScript: trying to access an XML document !?";
return false;
}
@@ -1341,13 +1341,13 @@
if (!activeKHTMLPart)
return true; // not a KHTMLPart
- DOM::HTMLDocument actDocument = activeKHTMLPart->htmlDocument();
- if ( actDocument.isNull() ) {
+ DOM::HTMLDocumentImpl* actDocument = activeKHTMLPart->docImpl();
+ if ( !actDocument ) {
kDebug(6070) << "Window::isSafeScript: active part has no document!";
return false;
}
- DOM::DOMString actDomain = actDocument.domain();
- DOM::DOMString thisDomain = thisDocument.domain();
+ DOM::DOMString actDomain = actDocument->domain();
+ DOM::DOMString thisDomain = thisDocument->domain();
if ( actDomain == thisDomain ) {
#ifdef KJS_VERBOSE
--- branches/KDE/4.1/kdelibs/khtml/khtml_part.cpp #843329:843330
@@ -5315,10 +5315,9 @@
}
// now compare the domains
- if (callingHtmlPart && !callingHtmlPart->htmlDocument().isNull() &&
- !htmlDocument().isNull()) {
- DOM::DOMString actDomain = callingHtmlPart->htmlDocument().domain();
- DOM::DOMString destDomain = htmlDocument().domain();
+ if (callingHtmlPart && callingHtmlPart->docImpl() && docImpl()) {
+ DOM::DOMString actDomain = callingHtmlPart->docImpl()->domain();
+ DOM::DOMString destDomain = docImpl()->domain();
#ifdef DEBUG_FINDFRAME
kDebug(6050) << "KHTMLPart::checkFrameAccess: actDomain = '" << \
actDomain.string() << "' destDomain = '" << destDomain.string() << "'";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic