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

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

Issue 2265443002: Fix an overflow in valueAsDate setter of temporal input types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: accept null Created 4 years, 4 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 | « third_party/WebKit/Source/bindings/scripts/v8_types.py ('k') | third_party/WebKit/Source/wtf/DateMath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
index 54b9564b48f2220377f15d4c5e292d571d151fd4..375c2a4209f4dd4718cfcb98c3621940b79881f7 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -205,8 +205,11 @@ static void dateAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<
static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
+ ExceptionState exceptionState(ExceptionState::SetterContext, "dateAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
- double cppValue = toCoreDate(info.GetIsolate(), v8Value);
+ double cppValue = toCoreDate(info.GetIsolate(), v8Value, exceptionState);
+ if (exceptionState.throwIfNeeded())
+ return;
impl->setDateAttribute(cppValue);
}
@@ -5075,14 +5078,18 @@ static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDateArg", "TestObject", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
- V8ThrowException::throwException(info.GetIsolate(), createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodDateArg", "TestObject", 1, info.Length()));
+ setMinimumArityTypeError(exceptionState, 1, info.Length());
+ exceptionState.throwIfNeeded();
return;
}
TestObject* impl = V8TestObject::toImpl(info.Holder());
double dateArg;
{
- dateArg = toCoreDate(info.GetIsolate(), info[0]);
+ dateArg = toCoreDate(info.GetIsolate(), info[0], exceptionState);
+ if (exceptionState.throwIfNeeded())
+ return;
}
impl->voidMethodDateArg(dateArg);
}
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/v8_types.py ('k') | third_party/WebKit/Source/wtf/DateMath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698