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

Unified Diff: Source/bindings/tests/results/core/V8TestInterfaceEventInit.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/V8TestInterfaceEventInit.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp b/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
index 6162dff4f20385fec819a44e11e57b4a96817c3b..19099a3650331644d262a104f4d6056e41328ed3 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
@@ -12,33 +12,33 @@
namespace blink {
-void V8TestInterfaceEventInit::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, TestInterfaceEventInit& impl, ExceptionState& exceptionState)
+bool V8TestInterfaceEventInit::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, TestInterfaceEventInit& impl, ExceptionState& exceptionState)
{
if (isUndefinedOrNull(v8Value))
- return;
+ return true;
if (!v8Value->IsObject()) {
exceptionState.throwTypeError("cannot convert to dictionary.");
- return;
+ return false;
}
- V8EventInitDictionary::toImpl(isolate, v8Value, impl, exceptionState);
- if (exceptionState.hadException())
- return;
+ if (!V8EventInitDictionary::toImpl(isolate, v8Value, impl, exceptionState))
+ return false;
v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate);
v8::TryCatch block;
v8::Local<v8::Value> stringMemberValue = v8Object->Get(v8String(isolate, "stringMember"));
if (block.HasCaught()) {
exceptionState.rethrowV8Exception(block.Exception());
- return;
+ return false;
}
if (stringMemberValue.IsEmpty() || stringMemberValue->IsUndefined()) {
// Do nothing.
} else {
- TOSTRING_VOID(V8StringResource<>, stringMember, stringMemberValue);
+ TONATIVE_DECLARE(V8StringResource<>, stringMember, (stringMember = stringMemberValue).prepare(exceptionState), return false);
impl.setStringMember(stringMember);
}
+ return true;
}
v8::Local<v8::Value> toV8(const TestInterfaceEventInit& impl, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)

Powered by Google App Engine
This is Rietveld 408576698