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

Unified Diff: third_party/WebKit/Source/core/fileapi/FileReaderSync.cpp

Issue 2811863002: Move ScriptState::GetExecutionContext (Part 4) (Closed)
Patch Set: Fix Document.cpp Created 3 years, 8 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/core/fileapi/FileReaderSync.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/FileReaderSync.cpp b/third_party/WebKit/Source/core/fileapi/FileReaderSync.cpp
index c64341a414e240bb4067c2656fe633d4851a30b3..699b57fc2d89ececb536718a770d32886f4e0836 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReaderSync.cpp
+++ b/third_party/WebKit/Source/core/fileapi/FileReaderSync.cpp
@@ -33,6 +33,7 @@
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/ScriptState.h"
#include "core/dom/DOMArrayBuffer.h"
+#include "core/dom/ExecutionContext.h"
#include "core/fileapi/Blob.h"
#include "core/fileapi/FileError.h"
#include "core/fileapi/FileReaderLoader.h"
@@ -75,7 +76,7 @@ DOMArrayBuffer* FileReaderSync::readAsArrayBuffer(
std::unique_ptr<FileReaderLoader> loader =
FileReaderLoader::Create(FileReaderLoader::kReadAsArrayBuffer, nullptr);
- StartLoading(script_state->GetExecutionContext(), *loader, *blob,
+ StartLoading(ExecutionContext::From(script_state), *loader, *blob,
exception_state);
return loader->ArrayBufferResult();
@@ -88,7 +89,7 @@ String FileReaderSync::readAsBinaryString(ScriptState* script_state,
std::unique_ptr<FileReaderLoader> loader =
FileReaderLoader::Create(FileReaderLoader::kReadAsBinaryString, nullptr);
- StartLoading(script_state->GetExecutionContext(), *loader, *blob,
+ StartLoading(ExecutionContext::From(script_state), *loader, *blob,
exception_state);
return loader->StringResult();
}
@@ -102,7 +103,7 @@ String FileReaderSync::readAsText(ScriptState* script_state,
std::unique_ptr<FileReaderLoader> loader =
FileReaderLoader::Create(FileReaderLoader::kReadAsText, nullptr);
loader->SetEncoding(encoding);
- StartLoading(script_state->GetExecutionContext(), *loader, *blob,
+ StartLoading(ExecutionContext::From(script_state), *loader, *blob,
exception_state);
return loader->StringResult();
}
@@ -115,7 +116,7 @@ String FileReaderSync::readAsDataURL(ScriptState* script_state,
std::unique_ptr<FileReaderLoader> loader =
FileReaderLoader::Create(FileReaderLoader::kReadAsDataURL, nullptr);
loader->SetDataType(blob->type());
- StartLoading(script_state->GetExecutionContext(), *loader, *blob,
+ StartLoading(ExecutionContext::From(script_state), *loader, *blob,
exception_state);
return loader->StringResult();
}
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/Blob.cpp ('k') | third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698