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

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

Issue 2616923002: Replace [CallWith=ExecutionContext] with [CallWith=ScriptState] (Closed)
Patch Set: Fix errors 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/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 236cde0bc297b7163c85843f362999f5ae3b022b..2b967df96e5a43a235f75466b039ad1598954ae1 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReaderSync.cpp
+++ b/third_party/WebKit/Source/core/fileapi/FileReaderSync.cpp
@@ -31,6 +31,7 @@
#include "core/fileapi/FileReaderSync.h"
#include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/ScriptState.h"
#include "core/dom/DOMArrayBuffer.h"
#include "core/fileapi/Blob.h"
#include "core/fileapi/FileError.h"
@@ -41,30 +42,32 @@ namespace blink {
FileReaderSync::FileReaderSync() {}
DOMArrayBuffer* FileReaderSync::readAsArrayBuffer(
- ExecutionContext* executionContext,
+ ScriptState* scriptState,
Blob* blob,
ExceptionState& exceptionState) {
ASSERT(blob);
std::unique_ptr<FileReaderLoader> loader =
FileReaderLoader::create(FileReaderLoader::ReadAsArrayBuffer, nullptr);
- startLoading(executionContext, *loader, *blob, exceptionState);
+ startLoading(scriptState->getExecutionContext(), *loader, *blob,
+ exceptionState);
return loader->arrayBufferResult();
}
-String FileReaderSync::readAsBinaryString(ExecutionContext* executionContext,
+String FileReaderSync::readAsBinaryString(ScriptState* scriptState,
Blob* blob,
ExceptionState& exceptionState) {
ASSERT(blob);
std::unique_ptr<FileReaderLoader> loader =
FileReaderLoader::create(FileReaderLoader::ReadAsBinaryString, nullptr);
- startLoading(executionContext, *loader, *blob, exceptionState);
+ startLoading(scriptState->getExecutionContext(), *loader, *blob,
+ exceptionState);
return loader->stringResult();
}
-String FileReaderSync::readAsText(ExecutionContext* executionContext,
+String FileReaderSync::readAsText(ScriptState* scriptState,
Blob* blob,
const String& encoding,
ExceptionState& exceptionState) {
@@ -73,11 +76,12 @@ String FileReaderSync::readAsText(ExecutionContext* executionContext,
std::unique_ptr<FileReaderLoader> loader =
FileReaderLoader::create(FileReaderLoader::ReadAsText, nullptr);
loader->setEncoding(encoding);
- startLoading(executionContext, *loader, *blob, exceptionState);
+ startLoading(scriptState->getExecutionContext(), *loader, *blob,
+ exceptionState);
return loader->stringResult();
}
-String FileReaderSync::readAsDataURL(ExecutionContext* executionContext,
+String FileReaderSync::readAsDataURL(ScriptState* scriptState,
Blob* blob,
ExceptionState& exceptionState) {
ASSERT(blob);
@@ -85,7 +89,8 @@ String FileReaderSync::readAsDataURL(ExecutionContext* executionContext,
std::unique_ptr<FileReaderLoader> loader =
FileReaderLoader::create(FileReaderLoader::ReadAsDataURL, nullptr);
loader->setDataType(blob->type());
- startLoading(executionContext, *loader, *blob, exceptionState);
+ startLoading(scriptState->getExecutionContext(), *loader, *blob,
+ exceptionState);
return loader->stringResult();
}
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/FileReaderSync.h ('k') | third_party/WebKit/Source/core/fileapi/FileReaderSync.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698