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

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: fixups for jens 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
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5147 matching lines...) Expand 10 before | Expand all | Expand 10 after
10157 } 10157 }
10158 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta te), exceptionState, false); 10158 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta te), exceptionState, false);
10159 RELEASE_ASSERT(!exceptionState.hadException()); 10159 RELEASE_ASSERT(!exceptionState.hadException());
10160 *result = cppValue; 10160 *result = cppValue;
10161 return true; 10161 return true;
10162 } 10162 }
10163 10163
10164 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba ckInfo<v8::Value>& info) 10164 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba ckInfo<v8::Value>& info)
10165 { 10165 {
10166 TestObject* impl = V8TestObject::toNative(info.Holder()); 10166 TestObject* impl = V8TestObject::toNative(info.Holder());
10167 int result; 10167 int result = 0;
10168 if (!shortMethodImplementedInPrivateScriptMethodImplementedInPrivateScript(t oFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) 10168 if (!shortMethodImplementedInPrivateScriptMethodImplementedInPrivateScript(t oFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result))
10169 return; 10169 return;
10170 v8SetReturnValueInt(info, result); 10170 v8SetReturnValueInt(info, result);
10171 } 10171 }
10172 10172
10173 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 10173 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
10174 { 10174 {
10175 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10175 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10176 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); 10176 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info);
10177 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 10177 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
10217 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 10217 throwMinimumArityTypeError(exceptionState, 1, info.Length());
10218 return; 10218 return;
10219 } 10219 }
10220 TestObject* impl = V8TestObject::toNative(info.Holder()); 10220 TestObject* impl = V8TestObject::toNative(info.Holder());
10221 int value; 10221 int value;
10222 { 10222 {
10223 v8::TryCatch block; 10223 v8::TryCatch block;
10224 V8RethrowTryCatchScope rethrow(block); 10224 V8RethrowTryCatchScope rethrow(block);
10225 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS tate), exceptionState); 10225 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS tate), exceptionState);
10226 } 10226 }
10227 int result; 10227 int result = 0;
10228 if (!shortMethodWithShortArgumentImplementedInPrivateScriptMethodImplemented InPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), im pl, value, &result)) 10228 if (!shortMethodWithShortArgumentImplementedInPrivateScriptMethodImplemented InPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), im pl, value, &result))
10229 return; 10229 return;
10230 v8SetReturnValueInt(info, result); 10230 v8SetReturnValueInt(info, result);
10231 } 10231 }
10232 10232
10233 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info) 10233 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info)
10234 { 10234 {
10235 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10235 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10236 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript Method(info); 10236 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript Method(info);
10237 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 10237 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
11017 fromInternalPointer(object)->deref(); 11017 fromInternalPointer(object)->deref();
11018 } 11018 }
11019 11019
11020 template<> 11020 template<>
11021 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate) 11021 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate)
11022 { 11022 {
11023 return toV8(impl, creationContext, isolate); 11023 return toV8(impl, creationContext, isolate);
11024 } 11024 }
11025 11025
11026 } // namespace WebCore 11026 } // namespace WebCore
OLDNEW
« 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