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

Unified Diff: Source/modules/filesystem/InspectorFileSystemAgent.cpp

Issue 909043003: FileReader.result attribute should use IDL union types to avoid using custom binding. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/fileapi/FileReader.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/filesystem/InspectorFileSystemAgent.cpp
diff --git a/Source/modules/filesystem/InspectorFileSystemAgent.cpp b/Source/modules/filesystem/InspectorFileSystemAgent.cpp
index aaef46227822a5a7a7eecd0c3b4d9889f4dd7df5..e90cc5cae88dbe37ff31c7b69030fd7cb76e0ae8 100644
--- a/Source/modules/filesystem/InspectorFileSystemAgent.cpp
+++ b/Source/modules/filesystem/InspectorFileSystemAgent.cpp
@@ -32,6 +32,7 @@
#include "modules/filesystem/InspectorFileSystemAgent.h"
#include "bindings/core/v8/ExceptionStatePlaceholder.h"
+#include "bindings/core/v8/UnionTypesCore.h"
#include "core/dom/DOMArrayBuffer.h"
#include "core/dom/DOMImplementation.h"
#include "core/dom/Document.h"
@@ -482,7 +483,9 @@ bool FileContentRequest::didGetFile(File* file)
void FileContentRequest::didRead()
{
- RefPtr<DOMArrayBuffer> buffer = m_reader->arrayBufferResult();
+ StringOrArrayBuffer resultAttribute;
+ m_reader->result(resultAttribute);
+ RefPtr<DOMArrayBuffer> buffer = resultAttribute.getAsArrayBuffer();
if (!m_readAsText) {
String result = base64Encode(static_cast<char*>(buffer->data()), buffer->byteLength());
« no previous file with comments | « Source/core/fileapi/FileReader.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698