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

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

Issue 768793002: Revert of IDL: Null values should be converted for non-nullable dictionary members (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 5c661ec9a82207d29de05c05d904e6d0acc447ad..9ee8ce1645f2e3b48a732de6b9e291d306101c29 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
@@ -28,15 +28,12 @@
v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate);
v8::TryCatch block;
v8::Local<v8::Value> stringMemberValue = v8Object->Get(v8String(isolate, "stringMember"));
- if (block.HasCaught()) {
+ if (!stringMemberValue.IsEmpty() && !isUndefinedOrNull(stringMemberValue)) {
+ TOSTRING_VOID(V8StringResource<>, stringMember, stringMemberValue);
+ impl.setStringMember(stringMember);
+ } else 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