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

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

Issue 2831943002: bindings: Port bindings/core/v8 away from ToImplArray APIs. (Closed)
Patch Set: Check for exception in SerializedScriptValue 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 24556b8530fbe9c0da60bcb64f8bb961edb0a507..9eca70129185d44336adcb9758e613e69583add0 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