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

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

Issue 563793002: Use conversion helpers in V8Binding.cpp for [Clamp] method arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 | « Source/bindings/templates/methods.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/core/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/core/V8TestObject.cpp b/Source/bindings/tests/results/core/V8TestObject.cpp
index c77ea4b3711f9ea72234cb897d1db87da0c9afab..a43fafb7db553bf11eb5edf1022a62c18a79a182 100644
--- a/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -8310,14 +8310,9 @@ static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo
return;
}
TestObject* impl = V8TestObject::toImpl(info.Holder());
- unsigned clampUnsignedShortArg = 0;
+ unsigned clampUnsignedShortArg;
{
- v8::TryCatch block;
- V8RethrowTryCatchScope rethrow(block);
- double clampUnsignedShortArgNativeValue;
- TONATIVE_VOID_INTERNAL(clampUnsignedShortArgNativeValue, info[0]->NumberValue());
- if (!std::isnan(clampUnsignedShortArgNativeValue))
- clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortArgNativeValue);
+ TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(clampUnsignedShortArg, toUInt16(info[0], Clamp, exceptionState), exceptionState);
}
impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg);
}
@@ -8338,14 +8333,9 @@ static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<
return;
}
TestObject* impl = V8TestObject::toImpl(info.Holder());
- unsigned clampUnsignedLongArg = 0;
+ unsigned clampUnsignedLongArg;
{
- v8::TryCatch block;
- V8RethrowTryCatchScope rethrow(block);
- double clampUnsignedLongArgNativeValue;
- TONATIVE_VOID_INTERNAL(clampUnsignedLongArgNativeValue, info[0]->NumberValue());
- if (!std::isnan(clampUnsignedLongArgNativeValue))
- clampUnsignedLongArg = clampTo<unsigned long>(clampUnsignedLongArgNativeValue);
+ TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(clampUnsignedLongArg, toUInt32(info[0], Clamp, exceptionState), exceptionState);
}
impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg);
}
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698