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

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

Issue 2610903002: Replace [CallWith=ExecutionContext] with [CallWith=ScriptState] (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/Response.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/Response.cpp b/third_party/WebKit/Source/modules/fetch/Response.cpp
index 6b4300cd2726bc285c540370352a76da15f8b218..f7ca19064803277c0eed219e308ea66d83c558b2 100644
--- a/third_party/WebKit/Source/modules/fetch/Response.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Response.cpp
@@ -299,19 +299,19 @@ Response* Response::create(ScriptState* scriptState,
return new Response(scriptState->getExecutionContext(), responseData);
}
-Response* Response::error(ExecutionContext* context) {
+Response* Response::error(ScriptState* scriptState) {
FetchResponseData* responseData =
FetchResponseData::createNetworkErrorResponse();
- Response* r = new Response(context, responseData);
+ Response* r = new Response(scriptState->getExecutionContext(), responseData);
r->m_headers->setGuard(Headers::ImmutableGuard);
return r;
}
-Response* Response::redirect(ExecutionContext* context,
+Response* Response::redirect(ScriptState* scriptState,
const String& url,
unsigned short status,
ExceptionState& exceptionState) {
- KURL parsedURL = context->completeURL(url);
+ KURL parsedURL = scriptState->getExecutionContext()->completeURL(url);
if (!parsedURL.isValid()) {
exceptionState.throwTypeError("Failed to parse URL from " + url);
return nullptr;
@@ -322,7 +322,7 @@ Response* Response::redirect(ExecutionContext* context,
return nullptr;
}
- Response* r = new Response(context);
+ Response* r = new Response(scriptState->getExecutionContext());
r->m_headers->setGuard(Headers::ImmutableGuard);
r->m_response->setStatus(status);
r->m_response->headerList()->set("Location", parsedURL);
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/Response.h ('k') | third_party/WebKit/Source/modules/fetch/Response.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698