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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp

Issue 2752223002: bindings: Add the proper includes for unions inside records (Closed)
Patch Set: Created 3 years, 9 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 | « third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
index 20a79e934a2b7d5b1adb0cb7cca9fe90d8826489..d3a465ad4c806a7406e41aab99b00fca324870d4 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
@@ -592,6 +592,20 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
impl.setUint8ArrayMember(uint8ArrayMember);
}
+ v8::Local<v8::Value> unionInRecordMemberValue;
+ if (!v8Object->Get(isolate->GetCurrentContext(), v8AtomicString(isolate, "unionInRecordMember")).ToLocal(&unionInRecordMemberValue)) {
+ exceptionState.rethrowV8Exception(block.Exception());
+ return;
+ }
+ if (unionInRecordMemberValue.IsEmpty() || unionInRecordMemberValue->IsUndefined()) {
+ // Do nothing.
+ } else {
+ HeapVector<std::pair<String, LongOrBoolean>> unionInRecordMember = NativeValueTraits<IDLRecord<IDLByteString, LongOrBoolean>>::nativeValue(isolate, unionInRecordMemberValue, exceptionState);
+ if (exceptionState.hadException())
+ return;
+ impl.setUnionInRecordMember(unionInRecordMember);
+ }
+
v8::Local<v8::Value> unionWithTypedefsValue;
if (!v8Object->Get(isolate->GetCurrentContext(), v8AtomicString(isolate, "unionWithTypedefs")).ToLocal(&unionWithTypedefsValue)) {
exceptionState.rethrowV8Exception(block.Exception());
@@ -854,6 +868,11 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
return false;
}
+ if (impl.hasUnionInRecordMember()) {
+ if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8AtomicString(isolate, "unionInRecordMember"), ToV8(impl.unionInRecordMember(), creationContext, isolate))))
+ return false;
+ }
+
if (impl.hasUnionWithTypedefs()) {
if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8AtomicString(isolate, "unionWithTypedefs"), ToV8(impl.unionWithTypedefs(), creationContext, isolate))))
return false;
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698