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

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

Issue 946973005: IDL: Drop value conversion (V8 -> C++) macros from generated code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
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 189661495ebe5faf5fd5aecea5c3f49cbf5bd844..596c977266efbed8681d7e1a8f0fb3c12c630ea0 100644
--- a/Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp
+++ b/Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp
@@ -12,45 +12,45 @@
namespace blink {
-void V8TestDictionaryDerivedImplementedAs::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, TestDictionaryDerivedImplementedAs& impl, ExceptionState& exceptionState)
+bool V8TestDictionaryDerivedImplementedAs::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, TestDictionaryDerivedImplementedAs& impl, ExceptionState& exceptionState)
{
if (isUndefinedOrNull(v8Value))
- return;
+ return true;
if (!v8Value->IsObject()) {
exceptionState.throwTypeError("cannot convert to dictionary.");
- return;
+ return false;
}
- V8TestDictionary::toImpl(isolate, v8Value, impl, exceptionState);
- if (exceptionState.hadException())
- return;
+ if (!V8TestDictionary::toImpl(isolate, v8Value, impl, exceptionState))
+ return false;
v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate);
v8::TryCatch block;
v8::Local<v8::Value> derivedStringMemberValue = v8Object->Get(v8String(isolate, "derivedStringMember"));
if (block.HasCaught()) {
exceptionState.rethrowV8Exception(block.Exception());
- return;
+ return false;
}
if (derivedStringMemberValue.IsEmpty() || derivedStringMemberValue->IsUndefined()) {
// Do nothing.
} else {
- TOSTRING_VOID(V8StringResource<>, derivedStringMember, derivedStringMemberValue);
+ TONATIVE_DECLARE(V8StringResource<>, derivedStringMember, (derivedStringMember = derivedStringMemberValue).prepare(exceptionState), return false);
impl.setDerivedStringMember(derivedStringMember);
}
v8::Local<v8::Value> derivedStringMemberWithDefaultValue = v8Object->Get(v8String(isolate, "derivedStringMemberWithDefault"));
if (block.HasCaught()) {
exceptionState.rethrowV8Exception(block.Exception());
- return;
+ return false;
}
if (derivedStringMemberWithDefaultValue.IsEmpty() || derivedStringMemberWithDefaultValue->IsUndefined()) {
// Do nothing.
} else {
- TOSTRING_VOID(V8StringResource<>, derivedStringMemberWithDefault, derivedStringMemberWithDefaultValue);
+ TONATIVE_DECLARE(V8StringResource<>, derivedStringMemberWithDefault, (derivedStringMemberWithDefault = derivedStringMemberWithDefaultValue).prepare(exceptionState), return false);
impl.setDerivedStringMemberWithDefault(derivedStringMemberWithDefault);
}
+ return true;
}
v8::Local<v8::Value> toV8(const TestDictionaryDerivedImplementedAs& impl, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)

Powered by Google App Engine
This is Rietveld 408576698