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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/DictionaryHelperForCore.cpp

Issue 2810843002: bindings: Make the sequence conversion code more complaint with WebIDL. (Closed)
Patch Set: 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/bindings/core/v8/DictionaryHelperForCore.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/DictionaryHelperForCore.cpp b/third_party/WebKit/Source/bindings/core/v8/DictionaryHelperForCore.cpp
index d2a5b0c1b60cc3c108c54ed480601db863c320a9..d61c323e10a609a91a52e4102308ddc0f34612b9 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DictionaryHelperForCore.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/DictionaryHelperForCore.cpp
@@ -27,6 +27,8 @@
#include "bindings/core/v8/DictionaryHelperForBindings.h"
#include "bindings/core/v8/ExceptionMessages.h"
#include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/IDLTypes.h"
+#include "bindings/core/v8/NativeValueTraitsImpl.h"
#include "bindings/core/v8/V8ArrayBufferView.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8Element.h"
@@ -273,8 +275,9 @@ CORE_EXPORT bool DictionaryHelper::Get(const Dictionary& dictionary,
v8::Uint32::New(dictionary.GetIsolate(), i))
.ToLocal(&v8_indexed_value))
return false;
- Vector<String> indexed_value = ToImplArray<Vector<String>>(
- v8_indexed_value, i, dictionary.GetIsolate(), exception_state);
+ Vector<String> indexed_value =
+ NativeValueTraits<IDLSequence<IDLString>>::NativeValue(
+ dictionary.GetIsolate(), v8_indexed_value, exception_state);
if (exception_state.HadException())
return false;
value.push_back(indexed_value);

Powered by Google App Engine
This is Rietveld 408576698