Changeset 287017 in webkit
- Timestamp:
- Dec 14, 2021, 1:35:38 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Modules/fetch/FetchResponse.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r287015 r287017 1 2021-12-14 Youenn Fablet <youenn@apple.com> 2 3 Null pointer crash in FetchResponse::clone 4 https://bugs.webkit.org/show_bug.cgi?id=234236 5 <rdar://86327601> 6 7 Reviewed by Alex Christensen. 8 9 From the log, we are most probably getting a null globalObject from a ScriptExecutionContext in FetchResponse::clone. 10 This may happen in case the document is navigated away but we still execute some code for it. 11 Add a null check to ensure we do not crash. 12 13 * Modules/fetch/FetchResponse.cpp: 14 (WebCore::FetchResponse::clone): 15 1 16 2021-12-14 Ben Nham <nham@apple.com> 2 17 -
trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp
r286970 r287017 183 183 // If loading, let's create a stream so that data is teed on both clones. 184 184 if (isLoading() && !m_readableStreamSource) { 185 auto voidOrException = createReadableStream(*context.globalObject()); 185 auto* globalObject = context.globalObject(); 186 if (!globalObject) 187 return Exception { InvalidStateError, "Context is stopped"_s }; 188 189 auto voidOrException = createReadableStream(*globalObject); 186 190 if (UNLIKELY(voidOrException.hasException())) 187 191 return voidOrException.releaseException();
Note:
See TracChangeset
for help on using the changeset viewer.