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

Unified Diff: Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.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: address comments 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/V8TestInterfaceGarbageCollected.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp b/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
index dd041eb8cbb6cb65236a4de59a55dfb97da18134..ae041260b5881ee452c112167132fb9a396ed34f 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
@@ -158,7 +158,7 @@ static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (!info[0]->IsFunction()) {
exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
- exceptionState.throwIfNeeded();
+ exceptionState.throwIfNeeded();
return;
}
callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]);
@@ -190,7 +190,9 @@ static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImpl(info.Holder());
V8StringResource<> value;
{
- TOSTRING_VOID_INTERNAL(value, info[0]);
+ value = info[0];
+ if (!value.prepare())
+ return;
}
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
bool result = impl->hasForBinding(scriptState, value, exceptionState);
@@ -219,7 +221,9 @@ static void addMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImpl(info.Holder());
V8StringResource<> value;
{
- TOSTRING_VOID_INTERNAL(value, info[0]);
+ value = info[0];
+ if (!value.prepare())
+ return;
}
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
RawPtr<TestInterfaceGarbageCollected> result = impl->addForBinding(scriptState, value, exceptionState);
@@ -267,7 +271,9 @@ static void deleteMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImpl(info.Holder());
V8StringResource<> value;
{
- TOSTRING_VOID_INTERNAL(value, info[0]);
+ value = info[0];
+ if (!value.prepare())
+ return;
}
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
bool result = impl->deleteForBinding(scriptState, value, exceptionState);
@@ -313,7 +319,9 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
}
V8StringResource<> str;
{
- TOSTRING_VOID_INTERNAL(str, info[0]);
+ str = info[0];
+ if (!str.prepare())
+ return;
}
RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected::create(str);
v8::Local<v8::Object> wrapper = info.Holder();

Powered by Google App Engine
This is Rietveld 408576698