WebKit Bugzilla
Attachment 371990 Details for
Bug 198766
: Add assertions to help debug crash at WebKit::HistoryEntryDataEncoder::operator<<
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-198766-20190612145416.patch (text/plain), 3.18 KB, created by
Sihui Liu
on 2019-06-12 14:54:17 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2019-06-12 14:54:17 PDT
Size:
3.18 KB
patch
obsolete
>Subversion Revision: 246374 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index baf2ae92aec8ddcb6db2e4315058df8d6104cf50..2bcf9d1c4f7db2fa9928aa18adba6bf5a374b874 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2019-06-12 Sihui Liu <sihui_liu@apple.com> >+ >+ Add assertions to help debug crash at WebKit::HistoryEntryDataEncoder::operator<< >+ https://bugs.webkit.org/show_bug.cgi?id=198766 >+ >+ Reviewed by Geoffrey Garen. >+ >+ * Shared/SessionState.h: >+ (WebKit::FrameState::~FrameState): >+ * UIProcess/API/C/WKPage.cpp: >+ (WKPageCopySessionState): >+ * UIProcess/mac/LegacySessionStateCoding.cpp: >+ (WebKit::HistoryEntryDataEncoder::encodeFixedLengthData): >+ (WebKit::encodeFrameStateNode): >+ > 2019-06-12 Ludovico de Nittis <ludovico.denittis@collabora.com> > > [GTK] GTK_STOCK_* types have been deprecated since GTK 3.10 >diff --git a/Source/WebKit/Shared/SessionState.h b/Source/WebKit/Shared/SessionState.h >index 69b9955de77ec98b64d4a752d17862df2ba60384..a329f953310563fcca5dfc6c360db5f310ebe37c 100644 >--- a/Source/WebKit/Shared/SessionState.h >+++ b/Source/WebKit/Shared/SessionState.h >@@ -111,6 +111,10 @@ struct FrameState { > #endif > > Vector<FrameState> children; >+ >+ // This is only used to help debug <rdar://problem/48634553>. >+ bool isDestructed { false }; >+ ~FrameState() { isDestructed = true; } > }; > > struct PageState { >diff --git a/Source/WebKit/UIProcess/API/C/WKPage.cpp b/Source/WebKit/UIProcess/API/C/WKPage.cpp >index ed86358201b4cef5b3f6b1a2f70fcb93efb764f2..ccc330f3024761fe739744562230526678b79040 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPage.cpp >+++ b/Source/WebKit/UIProcess/API/C/WKPage.cpp >@@ -480,8 +480,9 @@ WKTypeRef WKPageCopySessionState(WKPageRef pageRef, void* context, WKPageSession > return true; > }); > >+ auto data = encodeLegacySessionState(sessionState); > if (shouldReturnData) >- return toAPI(encodeLegacySessionState(sessionState).leakRef()); >+ return toAPI(data.leakRef()); > > return toAPI(&API::SessionState::create(WTFMove(sessionState)).leakRef()); > } >diff --git a/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp b/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp >index ea6c3777e50136cca586c3740c7ca4b2966e9943..9072ed647523d91c4aa528fee51c469062c83ae4 100644 >--- a/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp >+++ b/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp >@@ -208,6 +208,7 @@ private: > > void encodeFixedLengthData(const uint8_t* data, size_t size, unsigned alignment) > { >+ RELEASE_ASSERT(data || !size); > ASSERT(!(reinterpret_cast<uintptr_t>(data) % alignment)); > > uint8_t* buffer = grow(alignment, size); >@@ -318,7 +319,9 @@ static void encodeFrameStateNode(HistoryEntryDataEncoder& encoder, const FrameSt > { > encoder << static_cast<uint64_t>(frameState.children.size()); > >+ RELEASE_ASSERT(!frameState.isDestructed); > for (const auto& childFrameState : frameState.children) { >+ RELEASE_ASSERT(!childFrameState.isDestructed); > encoder << childFrameState.originalURLString; > encoder << childFrameState.urlString; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198766
:
371874
|
371879
|
371968
| 371990