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

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

Issue 390223004: initialize result variables in v8 bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: v2 based on comments Created 6 years, 5 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/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index 07725a293591ec475c6f49c860369f21127d8bca..cb7ad81ca3febd02715e784b056510bddb138f32 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -4920,7 +4920,7 @@ static void readonlyShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
{
v8::Handle<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toNative(holder);
- int result;
+ int result = 0;
if (!readonlyShortAttributeAttributeGetterImplementedInPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result))
return;
v8SetReturnValueInt(info, result);
@@ -4996,7 +4996,7 @@ static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
{
v8::Handle<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toNative(holder);
- int result;
+ int result = 0;
if (!shortAttributeAttributeGetterImplementedInPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result))
return;
v8SetReturnValueInt(info, result);
@@ -5088,7 +5088,7 @@ static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
{
v8::Handle<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toNative(holder);
- String result;
+ String result = "";
if (!stringAttributeAttributeGetterImplementedInPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result))
return;
v8SetReturnValueString(info, result, info.GetIsolate());
@@ -10164,7 +10164,7 @@ static bool shortMethodImplementedInPrivateScriptMethodImplementedInPrivateScrip
static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObject* impl = V8TestObject::toNative(info.Holder());
- int result;
+ int result = 0;
if (!shortMethodImplementedInPrivateScriptMethodImplementedInPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result))
return;
v8SetReturnValueInt(info, result);
@@ -10224,7 +10224,7 @@ static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v
V8RethrowTryCatchScope rethrow(block);
TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionState), exceptionState);
}
- int result;
+ int result = 0;
if (!shortMethodWithShortArgumentImplementedInPrivateScriptMethodImplementedInPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, value, &result))
return;
v8SetReturnValueInt(info, result);
@@ -10281,7 +10281,7 @@ static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const
{
TOSTRING_VOID_INTERNAL(value, info[0]);
}
- String result;
+ String result = "";
if (!stringMethodWithStringArgumentImplementedInPrivateScriptMethodImplementedInPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, value, &result))
return;
v8SetReturnValueString(info, result, info.GetIsolate());
« Source/bindings/scripts/v8_types.py ('K') | « Source/bindings/templates/methods.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698