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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestObject.h" 8 #include "V8TestObject.h"
9 9
10 #include "bindings/core/v8/BindingSecurity.h" 10 #include "bindings/core/v8/BindingSecurity.h"
(...skipping 4902 matching lines...) Expand 10 before | Expand all | Expand 10 after
4913 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta te), exceptionState, false); 4913 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta te), exceptionState, false);
4914 RELEASE_ASSERT(!exceptionState.hadException()); 4914 RELEASE_ASSERT(!exceptionState.hadException());
4915 *result = cppValue; 4915 *result = cppValue;
4916 return true; 4916 return true;
4917 } 4917 }
4918 4918
4919 static void readonlyShortAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 4919 static void readonlyShortAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
4920 { 4920 {
4921 v8::Handle<v8::Object> holder = info.Holder(); 4921 v8::Handle<v8::Object> holder = info.Holder();
4922 TestObject* impl = V8TestObject::toNative(holder); 4922 TestObject* impl = V8TestObject::toNative(holder);
4923 int result; 4923 int result = 0;
4924 if (!readonlyShortAttributeAttributeGetterImplementedInPrivateScript(toFrame IfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) 4924 if (!readonlyShortAttributeAttributeGetterImplementedInPrivateScript(toFrame IfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result))
4925 return; 4925 return;
4926 v8SetReturnValueInt(info, result); 4926 v8SetReturnValueInt(info, result);
4927 } 4927 }
4928 4928
4929 static void readonlyShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 4929 static void readonlyShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4930 { 4930 {
4931 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 4931 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
4932 TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info); 4932 TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info);
4933 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 4933 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
4989 } 4989 }
4990 return false; 4990 return false;
4991 } 4991 }
4992 return true; 4992 return true;
4993 } 4993 }
4994 4994
4995 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info) 4995 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
4996 { 4996 {
4997 v8::Handle<v8::Object> holder = info.Holder(); 4997 v8::Handle<v8::Object> holder = info.Holder();
4998 TestObject* impl = V8TestObject::toNative(holder); 4998 TestObject* impl = V8TestObject::toNative(holder);
4999 int result; 4999 int result = 0;
5000 if (!shortAttributeAttributeGetterImplementedInPrivateScript(toFrameIfNotDet ached(info.GetIsolate()->GetCurrentContext()), impl, &result)) 5000 if (!shortAttributeAttributeGetterImplementedInPrivateScript(toFrameIfNotDet ached(info.GetIsolate()->GetCurrentContext()), impl, &result))
5001 return; 5001 return;
5002 v8SetReturnValueInt(info, result); 5002 v8SetReturnValueInt(info, result);
5003 } 5003 }
5004 5004
5005 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info) 5005 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
5006 { 5006 {
5007 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 5007 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
5008 TestObjectV8Internal::shortAttributeAttributeGetter(info); 5008 TestObjectV8Internal::shortAttributeAttributeGetter(info);
5009 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5009 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 5168 matching lines...) Expand 10 before | Expand all | Expand 10 after
10178 } 10178 }
10179 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta te), exceptionState, false); 10179 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta te), exceptionState, false);
10180 RELEASE_ASSERT(!exceptionState.hadException()); 10180 RELEASE_ASSERT(!exceptionState.hadException());
10181 *result = cppValue; 10181 *result = cppValue;
10182 return true; 10182 return true;
10183 } 10183 }
10184 10184
10185 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba ckInfo<v8::Value>& info) 10185 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba ckInfo<v8::Value>& info)
10186 { 10186 {
10187 TestObject* impl = V8TestObject::toNative(info.Holder()); 10187 TestObject* impl = V8TestObject::toNative(info.Holder());
10188 int result; 10188 int result = 0;
10189 if (!shortMethodImplementedInPrivateScriptMethodImplementedInPrivateScript(t oFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) 10189 if (!shortMethodImplementedInPrivateScriptMethodImplementedInPrivateScript(t oFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result))
10190 return; 10190 return;
10191 v8SetReturnValueInt(info, result); 10191 v8SetReturnValueInt(info, result);
10192 } 10192 }
10193 10193
10194 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 10194 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
10195 { 10195 {
10196 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10196 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10197 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); 10197 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info);
10198 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 10198 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
10238 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 10238 throwMinimumArityTypeError(exceptionState, 1, info.Length());
10239 return; 10239 return;
10240 } 10240 }
10241 TestObject* impl = V8TestObject::toNative(info.Holder()); 10241 TestObject* impl = V8TestObject::toNative(info.Holder());
10242 int value; 10242 int value;
10243 { 10243 {
10244 v8::TryCatch block; 10244 v8::TryCatch block;
10245 V8RethrowTryCatchScope rethrow(block); 10245 V8RethrowTryCatchScope rethrow(block);
10246 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS tate), exceptionState); 10246 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS tate), exceptionState);
10247 } 10247 }
10248 int result; 10248 int result = 0;
10249 if (!shortMethodWithShortArgumentImplementedInPrivateScriptMethodImplemented InPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), im pl, value, &result)) 10249 if (!shortMethodWithShortArgumentImplementedInPrivateScriptMethodImplemented InPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), im pl, value, &result))
10250 return; 10250 return;
10251 v8SetReturnValueInt(info, result); 10251 v8SetReturnValueInt(info, result);
10252 } 10252 }
10253 10253
10254 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info) 10254 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info)
10255 { 10255 {
10256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10257 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript Method(info); 10257 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript Method(info);
10258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 10258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
11038 fromInternalPointer(object)->deref(); 11038 fromInternalPointer(object)->deref();
11039 } 11039 }
11040 11040
11041 template<> 11041 template<>
11042 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate) 11042 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate)
11043 { 11043 {
11044 return toV8(impl, creationContext, isolate); 11044 return toV8(impl, creationContext, isolate);
11045 } 11045 }
11046 11046
11047 } // namespace WebCore 11047 } // namespace WebCore
OLDNEW
« Source/bindings/templates/methods.cpp ('K') | « Source/bindings/templates/methods.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698