Changeset 87635 in webkit


Ignore:
Timestamp:
May 29, 2011 1:30:35 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-29 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r87566.
http://trac.webkit.org/changeset/87566
https://bugs.webkit.org/show_bug.cgi?id=61702

It made all tests assert on Qt in debug mode (Requested by
Ossy_weekend on #webkit).

  • WebCore.exp.in:
  • bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeIfJavaScriptURL):
  • dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::suggestedMIMEType): (WebCore::Document::lastModified): (WebCore::Document::initSecurityContext): (WebCore::Document::updateURLForPushOrReplaceState):
  • dom/Document.h: (WebCore::Document::setDocumentLoader): (WebCore::Document::loader):
  • html/MediaDocument.cpp: (WebCore::MediaDocument::replaceMediaElementTimerFired):
  • html/PluginDocument.cpp: (WebCore::PluginDocumentParser::createDocumentStructure):
  • platform/mac/HTMLConverter.mm: (fileWrapperForElement):
Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87634 r87635  
     12011-05-29  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r87566.
     4        http://trac.webkit.org/changeset/87566
     5        https://bugs.webkit.org/show_bug.cgi?id=61702
     6
     7        It made all tests assert on Qt in debug mode (Requested by
     8        Ossy_weekend on #webkit).
     9
     10        * WebCore.exp.in:
     11        * bindings/ScriptControllerBase.cpp:
     12        (WebCore::ScriptController::executeIfJavaScriptURL):
     13        * dom/Document.cpp:
     14        (WebCore::Document::Document):
     15        (WebCore::Document::suggestedMIMEType):
     16        (WebCore::Document::lastModified):
     17        (WebCore::Document::initSecurityContext):
     18        (WebCore::Document::updateURLForPushOrReplaceState):
     19        * dom/Document.h:
     20        (WebCore::Document::setDocumentLoader):
     21        (WebCore::Document::loader):
     22        * html/MediaDocument.cpp:
     23        (WebCore::MediaDocument::replaceMediaElementTimerFired):
     24        * html/PluginDocument.cpp:
     25        (WebCore::PluginDocumentParser::createDocumentStructure):
     26        * platform/mac/HTMLConverter.mm:
     27        (fileWrapperForElement):
     28
    1292011-05-28  Steve Falkenburg  <sfalken@apple.com>
    230
  • trunk/Source/WebCore/WebCore.exp.in

    r87623 r87635  
    12841284__ZNK7WebCore8Document4bodyEv
    12851285__ZNK7WebCore8Document6domainEv
    1286 __ZNK7WebCore8Document6loaderEv
    12871286__ZNK7WebCore8IntPointcv7CGPointEv
    12881287__ZNK7WebCore8IntPointcv8_NSPointEv
  • trunk/Source/WebCore/bindings/ScriptControllerBase.cpp

    r87566 r87635  
    115115    //        synchronously can cause crashes:
    116116    //        http://bugs.webkit.org/show_bug.cgi?id=16782
    117     if (shouldReplaceDocumentIfJavaScriptURL == ReplaceDocumentIfJavaScriptURL) {
    118         // We're still in a frame, so there should be a DocumentLoader.
    119         ASSERT(m_frame->document()->loader());
    120         if (DocumentLoader* loader = m_frame->document()->loader())
    121             loader->writer()->replaceDocument(scriptResult);
    122     }
     117    if (shouldReplaceDocumentIfJavaScriptURL == ReplaceDocumentIfJavaScriptURL)
     118        m_frame->document()->loader()->writer()->replaceDocument(scriptResult);
     119
    123120    return true;
    124121}
  • trunk/Source/WebCore/dom/Document.cpp

    r87566 r87635  
    436436
    437437    m_frame = frame;
     438    m_documentLoader = frame ? frame->loader()->activeDocumentLoader() : 0;
    438439
    439440    // We depend on the url getting immediately set in subframes, but we
     
    11061107        return "text/html";
    11071108
    1108     if (DocumentLoader* documentLoader = loader())
    1109         return documentLoader->responseMIMEType();
    1110     return String();
     1109    return m_documentLoader->responseMIMEType();
    11111110}
    11121111
     
    37833782    bool foundDate = false;
    37843783    if (m_frame) {
    3785         // Since we're still in a Frame, we should have a DocumentLoader.
    3786         ASSERT(loader());
    3787         String httpLastModified;
    3788         if (loader())
    3789             httpLastModified = loader()->response().httpHeaderField("Last-Modified");
     3784        String httpLastModified = m_documentLoader->response().httpHeaderField("Last-Modified");
    37903785        if (!httpLastModified.isEmpty()) {
    37913786            date.setMillisecondsSinceEpochForDateTime(parseDate(httpLastModified));
     
    45164511        // and https://bugs.webkit.org/show_bug.cgi?id=19760 for further
    45174512        // discussion.
    4518        
    4519         DocumentLoader* documentLoader = loader();
    4520         // Since we're still in a Frame, we should have a DocumentLoader.
    4521         ASSERT(documentLoader);
    4522         if (documentLoader && documentLoader->substituteData().isValid())
     4513        if (m_documentLoader->substituteData().isValid())
    45234514            securityOrigin()->grantLoadLocalResources();
    45244515    }
     
    46014592    setURL(url);
    46024593    f->loader()->setOutgoingReferrer(url);
    4603     // Since we're still in a frame, we should have a DocumentLoader.
    4604     ASSERT(loader());
    4605     if (DocumentLoader* documentLoader = loader())
    4606         documentLoader->replaceRequestURLForSameDocumentNavigation(url);
     4594    m_documentLoader->replaceRequestURLForSameDocumentNavigation(url);
    46074595}
    46084596
     
    51555143}
    51565144
    5157 DocumentLoader* Document::loader() const
    5158 {
    5159     if (!m_frame)
    5160         return 0;
    5161    
    5162     DocumentLoader* loader = m_frame->loader()->activeDocumentLoader();
    5163     if (!loader)
    5164         return 0;
    5165    
    5166     if (m_frame->document() != this)
    5167         return 0;
    5168    
    5169     return loader;
    5170 }
    5171 
    51725145} // namespace WebCore
  • trunk/Source/WebCore/dom/Document.h

    r87566 r87635  
    570570    bool visuallyOrdered() const { return m_visuallyOrdered; }
    571571   
    572     DocumentLoader* loader() const;
     572    void setDocumentLoader(DocumentLoader* documentLoader) { m_documentLoader = documentLoader; }
     573    DocumentLoader* loader() const { return m_documentLoader; }
    573574
    574575    void open(Document* ownerDocument = 0);
     
    11741175
    11751176    Frame* m_frame;
     1177    DocumentLoader* m_documentLoader;
    11761178    OwnPtr<CachedResourceLoader> m_cachedResourceLoader;
    11771179    RefPtr<DocumentParser> m_parser;
  • trunk/Source/WebCore/html/MediaDocument.cpp

    r87566 r87635  
    222222        embedElement->setAttribute(nameAttr, "plugin");
    223223        embedElement->setAttribute(srcAttr, url().string());
    224 
    225         DocumentLoader* documentLoader = loader();
    226         ASSERT(documentLoader);
    227         if (documentLoader)
    228             embedElement->setAttribute(typeAttr, documentLoader->writer()->mimeType());
     224        embedElement->setAttribute(typeAttr, loader()->writer()->mimeType());
    229225
    230226        ExceptionCode ec;
  • trunk/Source/WebCore/html/PluginDocument.cpp

    r87566 r87635  
    9393    m_embedElement->setAttribute(nameAttr, "plugin");
    9494    m_embedElement->setAttribute(srcAttr, document()->url().string());
    95    
    96     DocumentLoader* loader = document()->loader();
    97     ASSERT(loader);
    98     if (loader)
    99         m_embedElement->setAttribute(typeAttr, loader->writer()->mimeType());
     95    m_embedElement->setAttribute(typeAttr, document()->loader()->writer()->mimeType());
    10096
    10197    static_cast<PluginDocument*>(document())->setPluginNode(m_embedElement);
  • trunk/Source/WebCore/platform/mac/HTMLConverter.mm

    r87566 r87635  
    17541754    if (!attr.isEmpty()) {
    17551755        NSURL *URL = element->document()->completeURL(attr);
    1756         if (DocumentLoader* loader = element->document()->loader())
    1757             wrapper = fileWrapperForURL(loader, URL);
     1756        wrapper = fileWrapperForURL(element->document()->loader(), URL);
    17581757    }
    17591758    if (!wrapper) {
Note: See TracChangeset for help on using the changeset viewer.