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

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

Issue 2810843002: bindings: Make the sequence conversion code more complaint with WebIDL. (Closed)
Patch Set: Adjust even more tests 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/ScriptCustomElementDefinitionBuilder.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
index f5c1e00ed953583f58a5215aacb07a3b026e79b2..c6b698953f960dbfa60dcf1d064531dbc34059d7 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
@@ -6,6 +6,8 @@
#include "bindings/core/v8/DOMWrapperWorld.h"
#include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/IDLTypes.h"
+#include "bindings/core/v8/NativeValueTraitsImpl.h"
#include "bindings/core/v8/ScriptCustomElementDefinition.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/ScriptValue.h"
@@ -128,7 +130,7 @@ bool ScriptCustomElementDefinitionBuilder::RetrieveObservedAttributes() {
return false;
if (observed_attributes_value->IsUndefined())
return true;
- Vector<AtomicString> list = ToImplSequence<Vector<AtomicString>>(
+ Vector<String> list = NativeValueTraits<IDLSequence<IDLString>>::NativeValue(
script_state_->GetIsolate(), observed_attributes_value, exception_state_);
if (exception_state_.HadException())
return false;
@@ -136,7 +138,7 @@ bool ScriptCustomElementDefinitionBuilder::RetrieveObservedAttributes() {
return true;
observed_attributes_.ReserveCapacityForSize(list.size());
for (const auto& attribute : list)
- observed_attributes_.insert(attribute);
+ observed_attributes_.insert(AtomicString(attribute));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698