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

Unified Diff: Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp

Issue 765673005: IDL: Null values should be converted for non-nullable dictionary members (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: GN fix Created 6 years 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/bindings/tests/results/core/V8TestDictionaryDerived.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp b/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
index 9ee8ce1645f2e3b48a732de6b9e291d306101c29..5c661ec9a82207d29de05c05d904e6d0acc447ad 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
@@ -28,13 +28,16 @@ void V8TestInterfaceEventInit::toImpl(v8::Isolate* isolate, v8::Handle<v8::Value
v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate);
v8::TryCatch block;
v8::Local<v8::Value> stringMemberValue = v8Object->Get(v8String(isolate, "stringMember"));
- if (!stringMemberValue.IsEmpty() && !isUndefinedOrNull(stringMemberValue)) {
- TOSTRING_VOID(V8StringResource<>, stringMember, stringMemberValue);
- impl.setStringMember(stringMember);
- } else if (block.HasCaught()) {
+ if (block.HasCaught()) {
exceptionState.rethrowV8Exception(block.Exception());
return;
}
+ if (stringMemberValue.IsEmpty() || stringMemberValue->IsUndefined()) {
+ // Do nothing.
+ } else {
+ TOSTRING_VOID(V8StringResource<>, stringMember, stringMemberValue);
+ impl.setStringMember(stringMember);
+ }
}
« no previous file with comments | « Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698