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

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

Issue 1946453002: Make nullable members of IDL dictionaries contain null in JS when unset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_getComputedTiming
Patch Set: Fix test Created 4 years, 7 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/templates/dictionary_v8.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 b37223690301e2029267fca770bda39c6f3e90c1..ac071a597a0905cc72b176b82e523506b2e91ca9 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
@@ -669,6 +669,9 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
if (impl.hasElementOrNullMember()) {
if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "elementOrNullMember"), toV8(impl.elementOrNullMember(), creationContext, isolate))))
return false;
+ } else {
+ if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "elementOrNullMember"), v8::Null(isolate))))
+ return false;
}
if (impl.hasEnumMember()) {
@@ -712,6 +715,9 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
ASSERT(impl.objectOrNullMember().isObject());
if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "objectOrNullMember"), impl.objectOrNullMember().v8Value())))
return false;
+ } else {
+ if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "objectOrNullMember"), v8::Null(isolate))))
+ return false;
}
if (impl.hasOtherDoubleOrStringMember()) {
@@ -774,6 +780,9 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
if (impl.hasTestInterfaceGarbageCollectedOrNullMember()) {
if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "testInterfaceGarbageCollectedOrNullMember"), toV8(impl.testInterfaceGarbageCollectedOrNullMember(), creationContext, isolate))))
return false;
+ } else {
+ if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "testInterfaceGarbageCollectedOrNullMember"), v8::Null(isolate))))
+ return false;
}
if (impl.hasTestInterfaceGarbageCollectedSequenceMember()) {
@@ -792,6 +801,9 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
if (impl.hasTestInterfaceOrNullMember()) {
if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "testInterfaceOrNullMember"), toV8(impl.testInterfaceOrNullMember(), creationContext, isolate))))
return false;
+ } else {
+ if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "testInterfaceOrNullMember"), v8::Null(isolate))))
+ return false;
}
if (impl.hasTestInterfaceSequenceMember()) {
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698