| Index: third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp
|
| diff --git a/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp b/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp
|
| index 7f508118ad91a1f97a21ee3fb0210cd04c22db53..72efc30ce371628a82755179d654c2adfabdb00f 100644
|
| --- a/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp
|
| +++ b/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp
|
| @@ -98,6 +98,10 @@ ScriptPromise GlobalFetch::fetch(ScriptState* scriptState,
|
| const Dictionary& init,
|
| ExceptionState& exceptionState) {
|
| UseCounter::count(window.getExecutionContext(), UseCounter::Fetch);
|
| + if (!window.frame()) {
|
| + exceptionState.throwTypeError("The global scope is shutting down.");
|
| + return ScriptPromise();
|
| + }
|
| return ScopedFetcher::from(window)->fetch(scriptState, input, init,
|
| exceptionState);
|
| }
|
|
|