| 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 bae556366045de25d0f4c6bf790e4cd5e7f39ca7..a4bdd715b4aee27eda21eecc871e944e426fea19 100644
|
| --- a/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp
|
| +++ b/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp
|
| @@ -33,6 +33,11 @@ public:
|
|
|
| ScriptPromise fetch(ScriptState* scriptState, const RequestInfo& input, const Dictionary& init, ExceptionState& exceptionState) override
|
| {
|
| + if (!scriptState->contextIsValid()) {
|
| + // TODO(yhirano): Should this be moved to bindings?
|
| + exceptionState.throwTypeError("The global scope is shutting down.");
|
| + return ScriptPromise();
|
| + }
|
| if (m_fetchManager->isStopped()) {
|
| exceptionState.throwTypeError("The global scope is shutting down.");
|
| return ScriptPromise();
|
|
|