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

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

Issue 724733002: Support for [Clamp] and [EnforceRange] to IDL dictionary. (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/V8TestDictionary.cpp ('k') | Source/core/testing/DictionaryTest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp
diff --git a/Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp b/Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp
index ad418437631d4c777e439bee8511ab696db2bac8..6f70f48fa72a89f65456999e04d57ccd84b5c252 100644
--- a/Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp
+++ b/Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp
@@ -7,7 +7,6 @@
#include "config.h"
#include "V8TestDictionaryDerivedImplementedAs.h"
-#include "bindings/core/v8/Dictionary.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/V8TestDictionary.h"
@@ -26,22 +25,20 @@ void V8TestDictionaryDerivedImplementedAs::toImpl(v8::Isolate* isolate, v8::Hand
if (exceptionState.hadException())
return;
- // FIXME: Do not use Dictionary and DictionaryHelper
- // https://crbug.com/321462
- Dictionary dictionary(v8Value, isolate);
- // FIXME: Remove this v8::TryCatch once the code is switched from
- // Dictionary/DictionaryHelper to something that uses ExceptionState.
+ v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate);
v8::TryCatch block;
- String derivedStringMember;
- if (DictionaryHelper::getWithUndefinedOrNullCheck(dictionary, "derivedStringMember", derivedStringMember)) {
+ v8::Local<v8::Value> derivedStringMemberValue = v8Object->Get(v8String(isolate, "derivedStringMember"));
+ if (!derivedStringMemberValue.IsEmpty() && !isUndefinedOrNull(derivedStringMemberValue)) {
+ TOSTRING_VOID(V8StringResource<>, derivedStringMember, derivedStringMemberValue);
impl.setDerivedStringMember(derivedStringMember);
} else if (block.HasCaught()) {
exceptionState.rethrowV8Exception(block.Exception());
return;
}
- String derivedStringMemberWithDefault;
- if (DictionaryHelper::getWithUndefinedOrNullCheck(dictionary, "derivedStringMemberWithDefault", derivedStringMemberWithDefault)) {
+ v8::Local<v8::Value> derivedStringMemberWithDefaultValue = v8Object->Get(v8String(isolate, "derivedStringMemberWithDefault"));
+ if (!derivedStringMemberWithDefaultValue.IsEmpty() && !isUndefinedOrNull(derivedStringMemberWithDefaultValue)) {
+ TOSTRING_VOID(V8StringResource<>, derivedStringMemberWithDefault, derivedStringMemberWithDefaultValue);
impl.setDerivedStringMemberWithDefault(derivedStringMemberWithDefault);
} else if (block.HasCaught()) {
exceptionState.rethrowV8Exception(block.Exception());
« no previous file with comments | « Source/bindings/tests/results/core/V8TestDictionary.cpp ('k') | Source/core/testing/DictionaryTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698