Bug 167771 - REGRESSION(r210845): Build broken with ENABLE_MHTML disabled
Summary: REGRESSION(r210845): Build broken with ENABLE_MHTML disabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Csaba Osztrogonác
URL:
Keywords:
Depends on:
Blocks: 167055
  Show dependency treegraph
 
Reported: 2017-02-02 18:29 PST by Carlos Alberto Lopez Perez
Modified: 2017-02-13 01:54 PST (History)
8 users (show)

See Also:


Attachments
Patch (2.22 KB, patch)
2017-02-10 02:22 PST, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2017-02-02 18:29:48 PST
After r210845 <http://trac.webkit.org/changeset/210845> building WebKit without MHTML support fails:


../../Source/WebCore/loader/DocumentLoader.cpp:867:13: error: use of undeclared identifier 'm_archive'
        if (m_archive && m_archive->shouldOverrideBaseURL())
            ^
../../Source/WebCore/loader/DocumentLoader.cpp:867:26: error: use of undeclared identifier 'm_archive'
        if (m_archive && m_archive->shouldOverrideBaseURL())
                         ^
../../Source/WebCore/loader/DocumentLoader.cpp:868:53: error: use of undeclared identifier 'm_archive'
            m_frame->document()->setBaseURLOverride(m_archive->mainResource()->url());
                                                    ^
../../Source/WebCore/loader/DocumentLoader.cpp:884:17: error: use of undeclared identifier 'm_archive'
            if (m_archive && m_archive->shouldUseMainResourceEncoding())
                ^
../../Source/WebCore/loader/DocumentLoader.cpp:884:30: error: use of undeclared identifier 'm_archive'
            if (m_archive && m_archive->shouldUseMainResourceEncoding())
                             ^
../../Source/WebCore/loader/DocumentLoader.cpp:885:28: error: use of undeclared identifier 'm_archive'
                encoding = m_archive->mainResource()->textEncoding();
                           ^
../../Source/WebCore/loader/DocumentLoader.cpp:1128:30: error: member access into incomplete type 'WebCore::ArchiveResource'
    if (!resource || resource->shouldIgnoreWhenUnarchiving())
                             ^
Comment 1 Csaba Osztrogonác 2017-02-10 02:22:50 PST
Created attachment 301142 [details]
Patch
Comment 2 Daniel Bates 2017-02-10 05:00:53 PST
Comment on attachment 301142 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=301142&action=review

> Source/WebCore/loader/DocumentLoader.cpp:34
> +#include "Archive.h"

Did you mean to add this? Notice that Archive.h is included by ArchiveFactory.h (below), which is is conditionally included when either ENABLE(WEB_ARCHIVE) or ENABLE(MHTML) is enabled.
Comment 3 Csaba Osztrogonác 2017-02-13 01:29:25 PST
(In reply to comment #2)
> Comment on attachment 301142 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=301142&action=review
> 
> > Source/WebCore/loader/DocumentLoader.cpp:34
> > +#include "Archive.h"
> 
> Did you mean to add this? Notice that Archive.h is included by
> ArchiveFactory.h (below), which is is conditionally included when either
> ENABLE(WEB_ARCHIVE) or ENABLE(MHTML) is enabled.

Yes. As you mentioned, ArchiveFactory.h is included only if ENABLE(WEB_ARCHIVE)
or ENABLE(MHTML)is enabled. But Archive.h is necessary if both of them are
disabled. 

Without including Archive.h, the build fails with the following error:

../../Source/WebCore/loader/DocumentLoader.cpp: In member function 'WebCore::ArchiveResource* WebCore::DocumentLoader::archiveResourceForURL(const WebCore::URL&) const':
../../Source/WebCore/loader/DocumentLoader.cpp:1133:30: error: invalid use of incomplete type 'class WebCore::ArchiveResource'
Comment 4 WebKit Commit Bot 2017-02-13 01:54:48 PST
Comment on attachment 301142 [details]
Patch

Clearing flags on attachment: 301142

Committed r212227: <http://trac.webkit.org/changeset/212227>
Comment 5 WebKit Commit Bot 2017-02-13 01:54:53 PST
All reviewed patches have been landed.  Closing bug.