Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Unified Diff: third_party/WebKit/Source/modules/fetch/FetchManager.cpp

Issue 2614813004: Fix a crash of SRI when used with web workers (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/FetchManager.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
index 39e8daaac8f00a839a7de5edd9c2f199df3a7b22..2ee6ba535f1bdbaba6870feebc1e8f13470f50a5 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
@@ -215,7 +215,7 @@ class FetchManager::Loader final
if (r == WebDataConsumerHandle::Done) {
if (SubresourceIntegrity::CheckSubresourceIntegrity(
m_integrityMetadata, m_buffer.data(), m_buffer.size(), m_url,
- *m_loader->document(), errorMessage)) {
+ *m_loader->executionContext(), errorMessage)) {
m_updater->update(
new FormDataBytesConsumer(m_buffer.data(), m_buffer.size()));
m_loader->m_resolver->resolve(m_response);
@@ -272,6 +272,7 @@ class FetchManager::Loader final
void failed(const String& message);
void notifyFinished();
Document* document() const;
+ ExecutionContext* executionContext() { return m_executionContext; }
void loadSucceeded();
Member<FetchManager> m_fetchManager;

Powered by Google App Engine
This is Rietveld 408576698