[Webkit-unassigned] [Bug 36426] Chromium: Crash in WebCore::ArchiveFactory::isArchiveMimeType
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 13 07:46:26 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=36426
David Levin <levin at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #53247|review?, commit-queue? |review-, commit-queue-
Flag| |
--- Comment #16 from David Levin <levin at chromium.org> 2010-04-13 07:46:24 PST ---
(From update of attachment 53247)
r- due to enum naming (and the inability to say fix it on landing).
> diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
> @@ -2870,7 +2870,16 @@ void FrameLoader::finishedLoadingDocument(DocumentLoader* loader)
> #endif
>
> // If loading a webarchive, run through webarchive machinery
> +#if PLATFORM(CHROMIUM)
> + // https://bugs.webkit.org/show_bug.cgi?id=36426
> + // FIXME: jeremy at chromium.org - for debugging purposes, should be removed
No need to add an email name here. (File history will reveal who added this if
there is a question and is typical WK style to not add this.)
> diff --git a/WebKit/chromium/src/ResourceHandle.cpp b/WebKit/chromium/src/ResourceHandle.cpp
> + enum ConnectionState {
> + CONNECTION_STATE_NEW,
> + CONNECTION_STATE_STARTED,
> + CONNECTION_STATE_RECEIVED_RESPONSE,
> + CONNECTION_STATE_RECEIVING_DATA,
> + CONNECTION_STATE_FINISHED_LOADING,
> + CONNECTION_STATE_CANCELED,
> + CONNECTION_STATE_FAILED,
> + };
Enum members should user InterCaps with an initial capital letter.
> ResourceRequest m_request;
> ResourceHandle* m_owner;
> ResourceHandleClient* m_client;
> OwnPtr<WebURLLoader> m_loader;
> +
> + // Used for sanity checking to make sure we don't experience illegal state
> + // transitions.
> + ConnectionState m_state;
> };
>
> void ResourceHandleInternal::start()
> {
> + if (!(m_state == CONNECTION_STATE_NEW))
Why not simply
if (m_state != CONNECTION_STATE_NEW)
?
> + CRASH();
> @@ -135,6 +161,9 @@ void ResourceHandleInternal::didReceiveData(
> WebURLLoader*, const char* data, int dataLength)
> {
> ASSERT(m_client);
> + if (!(m_state == CONNECTION_STATE_RECEIVED_RESPONSE || m_state == CONNECTION_STATE_RECEIVING_DATA))
> + CRASH();
> + m_state = CONNECTION_STATE_RECEIVING_DATA;
>
> // FIXME(yurys): it looks like lengthReceived is always the same as
> // dataLength and that the latter parameter can be eliminated.
> @@ -145,12 +174,17 @@ void ResourceHandleInternal::didReceiveData(
> void ResourceHandleInternal::didFinishLoading(WebURLLoader*)
> {
> ASSERT(m_client);
> + if (!(m_state == CONNECTION_STATE_RECEIVED_RESPONSE
> + || m_state == CONNECTION_STATE_RECEIVING_DATA))
There is no need to fall within 80 columns (and this line is no longer than the
same line just a few lines above in this patch).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list