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

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

Issue 1011093002: [bindings] Pass NormalConversion to to[U]Int{8/16/32/64}(...) in v8_types.py and reduce conversion … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing after review comments! :) Created 5 years, 9 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/V8TestInterface.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterface.cpp b/Source/bindings/tests/results/core/V8TestInterface.cpp
index c992142f317369f6d410c4b7656a73b76c179d73..1054e8524f06b6378c44962c388b2f4a172ef5bb 100644
--- a/Source/bindings/tests/results/core/V8TestInterface.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterface.cpp
@@ -385,7 +385,7 @@ static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedAttribute", "TestInterface", holder, info.GetIsolate());
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- int cppValue = toInt32(info.GetIsolate(), v8Value, exceptionState);
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setAlwaysExposedAttribute(cppValue);
@@ -417,7 +417,7 @@ static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedAttribute", "TestInterface", holder, info.GetIsolate());
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- int cppValue = toInt32(info.GetIsolate(), v8Value, exceptionState);
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setWorkerExposedAttribute(cppValue);
@@ -449,7 +449,7 @@ static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedAttribute", "TestInterface", holder, info.GetIsolate());
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- int cppValue = toInt32(info.GetIsolate(), v8Value, exceptionState);
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setWindowExposedAttribute(cppValue);
@@ -821,7 +821,7 @@ static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAttribute", "TestInterface", holder, info.GetIsolate());
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- int cppValue = toInt32(info.GetIsolate(), v8Value, exceptionState);
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
TestPartialInterface::setPartialLongAttribute(*impl, cppValue);
@@ -857,7 +857,7 @@ static void partialStaticLongAttributeAttributeGetterCallback(v8::Local<v8::Name
static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticLongAttribute", "TestInterface", holder, info.GetIsolate());
- int cppValue = toInt32(info.GetIsolate(), v8Value, exceptionState);
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
TestPartialInterface::setPartialStaticLongAttribute(cppValue);
@@ -898,7 +898,7 @@ static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWithExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate());
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- int cppValue = toInt32(info.GetIsolate(), v8Value, exceptionState);
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
@@ -1018,7 +1018,7 @@ static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAttribute", "TestInterface", holder, info.GetIsolate());
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- int cppValue = toInt32(info.GetIsolate(), v8Value, exceptionState);
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue);
@@ -1046,7 +1046,7 @@ static void partial2StaticLongAttributeAttributeGetterCallback(v8::Local<v8::Nam
static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
ExceptionState exceptionState(ExceptionState::SetterContext, "partial2StaticLongAttribute", "TestInterface", holder, info.GetIsolate());
- int cppValue = toInt32(info.GetIsolate(), v8Value, exceptionState);
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue);
@@ -1290,7 +1290,7 @@ static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::Func
TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
int longArg;
{
- longArg = toInt32(info.GetIsolate(), info[0], exceptionState);
+ longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
@@ -1618,7 +1618,7 @@ static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va
TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
int longArg;
{
- longArg = toInt32(info.GetIsolate(), info[0], exceptionState);
+ longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
@@ -1699,7 +1699,7 @@ static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v
TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
int value;
{
- value = toInt16(info.GetIsolate(), info[0], exceptionState);
+ value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
@@ -2438,7 +2438,7 @@ bool V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPr
v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShortArgumentImplementedInPrivateScript", holder, 1, argv);
if (v8Value.IsEmpty())
return false;
- int cppValue = toInt16(scriptState->isolate(), v8Value, exceptionState);
+ int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return false;
*result = cppValue;
« no previous file with comments | « Source/bindings/tests/results/core/V8TestDictionary.cpp ('k') | Source/bindings/tests/results/core/V8TestInterface2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698