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

Side by Side Diff: Source/bindings/tests/results/V8TestObject.cpp

Issue 48003002: IDL compiler: remove blank line for void methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 2807 matching lines...) Expand 10 before | Expand all | Expand 10 after
2818 2818
2819 static void TestObjReplaceableAttributeSetterCallback(v8::Local<v8::String> name , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2819 static void TestObjReplaceableAttributeSetterCallback(v8::Local<v8::String> name , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2820 { 2820 {
2821 TestObjV8Internal::TestObjReplaceableAttributeSetter(name, jsValue, info); 2821 TestObjV8Internal::TestObjReplaceableAttributeSetter(name, jsValue, info);
2822 } 2822 }
2823 2823
2824 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 2824 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
2825 { 2825 {
2826 TestObj* imp = V8TestObject::toNative(args.Holder()); 2826 TestObj* imp = V8TestObject::toNative(args.Holder());
2827 imp->voidMethod(); 2827 imp->voidMethod();
2828
2829 return; 2828 return;
2830 } 2829 }
2831 2830
2832 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) 2831 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
2833 { 2832 {
2834 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 2833 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2835 TestObjV8Internal::voidMethodMethod(args); 2834 TestObjV8Internal::voidMethodMethod(args);
2836 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2835 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2837 } 2836 }
2838 2837
2839 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 2838 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
2840 { 2839 {
2841 if (UNLIKELY(args.Length() < 3)) { 2840 if (UNLIKELY(args.Length() < 3)) {
2842 throwTypeError(ExceptionMessages::failedToExecute("voidMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, args.Length())), args.Get Isolate()); 2841 throwTypeError(ExceptionMessages::failedToExecute("voidMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, args.Length())), args.Get Isolate());
2843 return; 2842 return;
2844 } 2843 }
2845 TestObj* imp = V8TestObject::toNative(args.Holder()); 2844 TestObj* imp = V8TestObject::toNative(args.Holder());
2846 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 2845 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
2847 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); 2846 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]);
2848 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[2])) : 0); 2847 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[2])) : 0);
2849 imp->voidMethodWithArgs(longArg, strArg, objArg); 2848 imp->voidMethodWithArgs(longArg, strArg, objArg);
2850
2851 return; 2849 return;
2852 } 2850 }
2853 2851
2854 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args) 2852 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args)
2855 { 2853 {
2856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 2854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2857 TestObjV8Internal::voidMethodWithArgsMethod(args); 2855 TestObjV8Internal::voidMethodWithArgsMethod(args);
2858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2856 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2859 } 2857 }
2860 2858
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
2931 2929
2932 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value >& args) 2930 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value >& args)
2933 { 2931 {
2934 if (UNLIKELY(args.Length() < 1)) { 2932 if (UNLIKELY(args.Length() < 1)) {
2935 throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate()); 2933 throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate());
2936 return; 2934 return;
2937 } 2935 }
2938 TestObj* imp = V8TestObject::toNative(args.Holder()); 2936 TestObj* imp = V8TestObject::toNative(args.Holder());
2939 V8TRYCATCH_VOID(Vector<RefPtr<TestInterface> >, sequenceArg, (toRefPtrNative Array<TestInterface, V8TestInterface>(args[0], 1, args.GetIsolate()))); 2937 V8TRYCATCH_VOID(Vector<RefPtr<TestInterface> >, sequenceArg, (toRefPtrNative Array<TestInterface, V8TestInterface>(args[0], 1, args.GetIsolate())));
2940 imp->methodWithSequenceArg(sequenceArg); 2938 imp->methodWithSequenceArg(sequenceArg);
2941
2942 return; 2939 return;
2943 } 2940 }
2944 2941
2945 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args) 2942 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args)
2946 { 2943 {
2947 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 2944 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2948 TestObjV8Internal::methodWithSequenceArgMethod(args); 2945 TestObjV8Internal::methodWithSequenceArgMethod(args);
2949 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2946 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2950 } 2947 }
2951 2948
(...skipping 23 matching lines...) Expand all
2975 return; 2972 return;
2976 } 2973 }
2977 TestObj* imp = V8TestObject::toNative(args.Holder()); 2974 TestObj* imp = V8TestObject::toNative(args.Holder());
2978 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, enumArg, args[0]); 2975 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, enumArg, args[0]);
2979 String string = enumArg; 2976 String string = enumArg;
2980 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3")) { 2977 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3")) {
2981 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", " TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), args. GetIsolate()); 2978 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", " TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), args. GetIsolate());
2982 return; 2979 return;
2983 } 2980 }
2984 imp->methodWithEnumArg(enumArg); 2981 imp->methodWithEnumArg(enumArg);
2985
2986 return; 2982 return;
2987 } 2983 }
2988 2984
2989 static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args) 2985 static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args)
2990 { 2986 {
2991 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 2987 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2992 TestObjV8Internal::methodWithEnumArgMethod(args); 2988 TestObjV8Internal::methodWithEnumArgMethod(args);
2993 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2989 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2994 } 2990 }
2995 2991
(...skipping 26 matching lines...) Expand all
3022 if (UNLIKELY(args.Length() < 1)) { 3018 if (UNLIKELY(args.Length() < 1)) {
3023 throwTypeError(ExceptionMessages::failedToExecute("serializedValue", "Te stObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIso late()); 3019 throwTypeError(ExceptionMessages::failedToExecute("serializedValue", "Te stObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIso late());
3024 return; 3020 return;
3025 } 3021 }
3026 TestObj* imp = V8TestObject::toNative(args.Holder()); 3022 TestObj* imp = V8TestObject::toNative(args.Holder());
3027 bool serializedArgDidThrow = false; 3023 bool serializedArgDidThrow = false;
3028 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create( args[0], 0, 0, serializedArgDidThrow, args.GetIsolate()); 3024 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create( args[0], 0, 0, serializedArgDidThrow, args.GetIsolate());
3029 if (serializedArgDidThrow) 3025 if (serializedArgDidThrow)
3030 return; 3026 return;
3031 imp->serializedValue(serializedArg); 3027 imp->serializedValue(serializedArg);
3032
3033 return; 3028 return;
3034 } 3029 }
3035 3030
3036 static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& args) 3031 static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& args)
3037 { 3032 {
3038 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3033 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3039 TestObjV8Internal::serializedValueMethod(args); 3034 TestObjV8Internal::serializedValueMethod(args);
3040 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3035 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3041 } 3036 }
3042 3037
3043 static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 3038 static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
3044 { 3039 {
3045 if (UNLIKELY(args.Length() < 1)) { 3040 if (UNLIKELY(args.Length() < 1)) {
3046 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsola te()); 3041 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsola te());
3047 return; 3042 return;
3048 } 3043 }
3049 TestObj* imp = V8TestObject::toNative(args.Holder()); 3044 TestObj* imp = V8TestObject::toNative(args.Holder());
3050 V8TRYCATCH_VOID(Dictionary, oo, Dictionary(args[0], args.GetIsolate())); 3045 V8TRYCATCH_VOID(Dictionary, oo, Dictionary(args[0], args.GetIsolate()));
3051 if (!oo.isUndefinedOrNull() && !oo.isObject()) { 3046 if (!oo.isUndefinedOrNull() && !oo.isObject()) {
3052 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", "parameter 1 ('oo') is not an object."), args.GetIsolate()); 3047 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", "parameter 1 ('oo') is not an object."), args.GetIsolate());
3053 return; 3048 return;
3054 } 3049 }
3055 V8TRYCATCH_VOID(Dictionary, ooo, Dictionary(args[1], args.GetIsolate())); 3050 V8TRYCATCH_VOID(Dictionary, ooo, Dictionary(args[1], args.GetIsolate()));
3056 if (!ooo.isUndefinedOrNull() && !ooo.isObject()) { 3051 if (!ooo.isUndefinedOrNull() && !ooo.isObject()) {
3057 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", "parameter 2 ('ooo') is not an object."), args.GetIsolate()); 3052 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", "parameter 2 ('ooo') is not an object."), args.GetIsolate());
3058 return; 3053 return;
3059 } 3054 }
3060 imp->optionsObject(oo, ooo); 3055 imp->optionsObject(oo, ooo);
3061
3062 return; 3056 return;
3063 } 3057 }
3064 3058
3065 static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& args) 3059 static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& args)
3066 { 3060 {
3067 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3068 TestObjV8Internal::optionsObjectMethod(args); 3062 TestObjV8Internal::optionsObjectMethod(args);
3069 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3070 } 3064 }
3071 3065
3072 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 3066 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
3073 { 3067 {
3074 TestObj* imp = V8TestObject::toNative(args.Holder()); 3068 TestObj* imp = V8TestObject::toNative(args.Holder());
3075 ExceptionState es(args.GetIsolate()); 3069 ExceptionState es(args.GetIsolate());
3076 imp->methodWithException(es); 3070 imp->methodWithException(es);
3077 if (es.throwIfNeeded()) 3071 if (es.throwIfNeeded())
3078 return; 3072 return;
3079
3080 return; 3073 return;
3081 } 3074 }
3082 3075
3083 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args) 3076 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args)
3084 { 3077 {
3085 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3078 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3086 TestObjV8Internal::methodWithExceptionMethod(args); 3079 TestObjV8Internal::methodWithExceptionMethod(args);
3087 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3080 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3088 } 3081 }
3089 3082
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
3169 if (!currentState) 3162 if (!currentState)
3170 return; 3163 return;
3171 ScriptState& state = *currentState; 3164 ScriptState& state = *currentState;
3172 imp->withScriptStateVoid(&state); 3165 imp->withScriptStateVoid(&state);
3173 if (state.hadException()) { 3166 if (state.hadException()) {
3174 v8::Local<v8::Value> exception = state.exception(); 3167 v8::Local<v8::Value> exception = state.exception();
3175 state.clearException(); 3168 state.clearException();
3176 throwError(exception, args.GetIsolate()); 3169 throwError(exception, args.GetIsolate());
3177 return; 3170 return;
3178 } 3171 }
3179
3180 return; 3172 return;
3181 } 3173 }
3182 3174
3183 static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args) 3175 static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args)
3184 { 3176 {
3185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3186 TestObjV8Internal::withScriptStateVoidMethod(args); 3178 TestObjV8Internal::withScriptStateVoidMethod(args);
3187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3188 } 3180 }
3189 3181
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3222 ScriptState& state = *currentState; 3214 ScriptState& state = *currentState;
3223 imp->withScriptStateVoidException(&state, es); 3215 imp->withScriptStateVoidException(&state, es);
3224 if (es.throwIfNeeded()) 3216 if (es.throwIfNeeded())
3225 return; 3217 return;
3226 if (state.hadException()) { 3218 if (state.hadException()) {
3227 v8::Local<v8::Value> exception = state.exception(); 3219 v8::Local<v8::Value> exception = state.exception();
3228 state.clearException(); 3220 state.clearException();
3229 throwError(exception, args.GetIsolate()); 3221 throwError(exception, args.GetIsolate());
3230 return; 3222 return;
3231 } 3223 }
3232
3233 return; 3224 return;
3234 } 3225 }
3235 3226
3236 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& args) 3227 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& args)
3237 { 3228 {
3238 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3239 TestObjV8Internal::withScriptStateVoidExceptionMethod(args); 3230 TestObjV8Internal::withScriptStateVoidExceptionMethod(args);
3240 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3241 } 3232 }
3242 3233
(...skipping 23 matching lines...) Expand all
3266 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3257 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3267 TestObjV8Internal::withScriptStateObjExceptionMethod(args); 3258 TestObjV8Internal::withScriptStateObjExceptionMethod(args);
3268 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3269 } 3260 }
3270 3261
3271 static void withExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value> & args) 3262 static void withExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value> & args)
3272 { 3263 {
3273 TestObj* imp = V8TestObject::toNative(args.Holder()); 3264 TestObj* imp = V8TestObject::toNative(args.Holder());
3274 ExecutionContext* scriptContext = getExecutionContext(); 3265 ExecutionContext* scriptContext = getExecutionContext();
3275 imp->withExecutionContext(scriptContext); 3266 imp->withExecutionContext(scriptContext);
3276
3277 return; 3267 return;
3278 } 3268 }
3279 3269
3280 static void withExecutionContextMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args) 3270 static void withExecutionContextMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args)
3281 { 3271 {
3282 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3272 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3283 TestObjV8Internal::withExecutionContextMethod(args); 3273 TestObjV8Internal::withExecutionContextMethod(args);
3284 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3285 } 3275 }
3286 3276
3287 static void withExecutionContextAndScriptStateMethod(const v8::FunctionCallbackI nfo<v8::Value>& args) 3277 static void withExecutionContextAndScriptStateMethod(const v8::FunctionCallbackI nfo<v8::Value>& args)
3288 { 3278 {
3289 TestObj* imp = V8TestObject::toNative(args.Holder()); 3279 TestObj* imp = V8TestObject::toNative(args.Holder());
3290 ScriptState* currentState = ScriptState::current(); 3280 ScriptState* currentState = ScriptState::current();
3291 if (!currentState) 3281 if (!currentState)
3292 return; 3282 return;
3293 ScriptState& state = *currentState; 3283 ScriptState& state = *currentState;
3294 ExecutionContext* scriptContext = getExecutionContext(); 3284 ExecutionContext* scriptContext = getExecutionContext();
3295 imp->withExecutionContextAndScriptState(&state, scriptContext); 3285 imp->withExecutionContextAndScriptState(&state, scriptContext);
3296 if (state.hadException()) { 3286 if (state.hadException()) {
3297 v8::Local<v8::Value> exception = state.exception(); 3287 v8::Local<v8::Value> exception = state.exception();
3298 state.clearException(); 3288 state.clearException();
3299 throwError(exception, args.GetIsolate()); 3289 throwError(exception, args.GetIsolate());
3300 return; 3290 return;
3301 } 3291 }
3302
3303 return; 3292 return;
3304 } 3293 }
3305 3294
3306 static void withExecutionContextAndScriptStateMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& args) 3295 static void withExecutionContextAndScriptStateMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& args)
3307 { 3296 {
3308 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3297 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3309 TestObjV8Internal::withExecutionContextAndScriptStateMethod(args); 3298 TestObjV8Internal::withExecutionContextAndScriptStateMethod(args);
3310 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3299 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3311 } 3300 }
3312 3301
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
3362 { 3351 {
3363 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3352 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3364 TestObjV8Internal::withExecutionContextAndScriptStateWithSpacesMethod(args); 3353 TestObjV8Internal::withExecutionContextAndScriptStateWithSpacesMethod(args);
3365 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3354 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3366 } 3355 }
3367 3356
3368 static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo< v8::Value>& args) 3357 static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo< v8::Value>& args)
3369 { 3358 {
3370 TestObj* imp = V8TestObject::toNative(args.Holder()); 3359 TestObj* imp = V8TestObject::toNative(args.Holder());
3371 imp->withActiveWindowAndFirstWindow(activeDOMWindow(), firstDOMWindow()); 3360 imp->withActiveWindowAndFirstWindow(activeDOMWindow(), firstDOMWindow());
3372
3373 return; 3361 return;
3374 } 3362 }
3375 3363
3376 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& args) 3364 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& args)
3377 { 3365 {
3378 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3366 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3379 TestObjV8Internal::withActiveWindowAndFirstWindowMethod(args); 3367 TestObjV8Internal::withActiveWindowAndFirstWindowMethod(args);
3380 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3368 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3381 } 3369 }
3382 3370
3383 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value >& args) 3371 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value >& args)
3384 { 3372 {
3385 TestObj* imp = V8TestObject::toNative(args.Holder()); 3373 TestObj* imp = V8TestObject::toNative(args.Holder());
3386 if (UNLIKELY(args.Length() <= 0)) { 3374 if (UNLIKELY(args.Length() <= 0)) {
3387 imp->methodWithOptionalArg(); 3375 imp->methodWithOptionalArg();
3388
3389 return; 3376 return;
3390 } 3377 }
3391 V8TRYCATCH_VOID(int, opt, toInt32(args[0])); 3378 V8TRYCATCH_VOID(int, opt, toInt32(args[0]));
3392 imp->methodWithOptionalArg(opt); 3379 imp->methodWithOptionalArg(opt);
3393
3394 return; 3380 return;
3395 } 3381 }
3396 3382
3397 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args) 3383 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args)
3398 { 3384 {
3399 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3385 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3400 TestObjV8Internal::methodWithOptionalArgMethod(args); 3386 TestObjV8Internal::methodWithOptionalArgMethod(args);
3401 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3387 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3402 } 3388 }
3403 3389
3404 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& args) 3390 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& args)
3405 { 3391 {
3406 if (UNLIKELY(args.Length() < 1)) { 3392 if (UNLIKELY(args.Length() < 1)) {
3407 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndOptionalArg", "TestObject", ExceptionMessages::notEnoughArguments(1, args. Length())), args.GetIsolate()); 3393 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndOptionalArg", "TestObject", ExceptionMessages::notEnoughArguments(1, args. Length())), args.GetIsolate());
3408 return; 3394 return;
3409 } 3395 }
3410 TestObj* imp = V8TestObject::toNative(args.Holder()); 3396 TestObj* imp = V8TestObject::toNative(args.Holder());
3411 V8TRYCATCH_VOID(int, nonOpt, toInt32(args[0])); 3397 V8TRYCATCH_VOID(int, nonOpt, toInt32(args[0]));
3412 if (UNLIKELY(args.Length() <= 1)) { 3398 if (UNLIKELY(args.Length() <= 1)) {
3413 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); 3399 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt);
3414
3415 return; 3400 return;
3416 } 3401 }
3417 V8TRYCATCH_VOID(int, opt, toInt32(args[1])); 3402 V8TRYCATCH_VOID(int, opt, toInt32(args[1]));
3418 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); 3403 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
3419
3420 return; 3404 return;
3421 } 3405 }
3422 3406
3423 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& args) 3407 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& args)
3424 { 3408 {
3425 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3409 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3426 TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(args); 3410 TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(args);
3427 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3428 } 3412 }
3429 3413
3430 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC allbackInfo<v8::Value>& args) 3414 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC allbackInfo<v8::Value>& args)
3431 { 3415 {
3432 if (UNLIKELY(args.Length() < 1)) { 3416 if (UNLIKELY(args.Length() < 1)) {
3433 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndTwoOptionalArgs", "TestObject", ExceptionMessages::notEnoughArguments(1, a rgs.Length())), args.GetIsolate()); 3417 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndTwoOptionalArgs", "TestObject", ExceptionMessages::notEnoughArguments(1, a rgs.Length())), args.GetIsolate());
3434 return; 3418 return;
3435 } 3419 }
3436 TestObj* imp = V8TestObject::toNative(args.Holder()); 3420 TestObj* imp = V8TestObject::toNative(args.Holder());
3437 V8TRYCATCH_VOID(int, nonOpt, toInt32(args[0])); 3421 V8TRYCATCH_VOID(int, nonOpt, toInt32(args[0]));
3438 if (UNLIKELY(args.Length() <= 1)) { 3422 if (UNLIKELY(args.Length() <= 1)) {
3439 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); 3423 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt);
3440
3441 return; 3424 return;
3442 } 3425 }
3443 V8TRYCATCH_VOID(int, opt1, toInt32(args[1])); 3426 V8TRYCATCH_VOID(int, opt1, toInt32(args[1]));
3444 if (UNLIKELY(args.Length() <= 2)) { 3427 if (UNLIKELY(args.Length() <= 2)) {
3445 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); 3428 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1);
3446
3447 return; 3429 return;
3448 } 3430 }
3449 V8TRYCATCH_VOID(int, opt2, toInt32(args[2])); 3431 V8TRYCATCH_VOID(int, opt2, toInt32(args[2]));
3450 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); 3432 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
3451
3452 return; 3433 return;
3453 } 3434 }
3454 3435
3455 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& args) 3436 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& args)
3456 { 3437 {
3457 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3438 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3458 TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(args); 3439 TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(args);
3459 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3440 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3460 } 3441 }
3461 3442
3462 static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Va lue>& args) 3443 static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Va lue>& args)
3463 { 3444 {
3464 TestObj* imp = V8TestObject::toNative(args.Holder()); 3445 TestObj* imp = V8TestObject::toNative(args.Holder());
3465 if (UNLIKELY(args.Length() <= 0)) { 3446 if (UNLIKELY(args.Length() <= 0)) {
3466 imp->methodWithOptionalString(); 3447 imp->methodWithOptionalString();
3467
3468 return; 3448 return;
3469 } 3449 }
3470 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]); 3450 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]);
3471 imp->methodWithOptionalString(str); 3451 imp->methodWithOptionalString(str);
3472
3473 return; 3452 return;
3474 } 3453 }
3475 3454
3476 static void methodWithOptionalStringMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& args) 3455 static void methodWithOptionalStringMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& args)
3477 { 3456 {
3478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3457 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3479 TestObjV8Internal::methodWithOptionalStringMethod(args); 3458 TestObjV8Internal::methodWithOptionalStringMethod(args);
3480 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3459 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3481 } 3460 }
3482 3461
3483 static void methodWithOptionalStringIsUndefinedMethod(const v8::FunctionCallback Info<v8::Value>& args) 3462 static void methodWithOptionalStringIsUndefinedMethod(const v8::FunctionCallback Info<v8::Value>& args)
3484 { 3463 {
3485 TestObj* imp = V8TestObject::toNative(args.Holder()); 3464 TestObj* imp = V8TestObject::toNative(args.Holder());
3486 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]); 3465 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]);
3487 imp->methodWithOptionalStringIsUndefined(str); 3466 imp->methodWithOptionalStringIsUndefined(str);
3488
3489 return; 3467 return;
3490 } 3468 }
3491 3469
3492 static void methodWithOptionalStringIsUndefinedMethodCallback(const v8::Function CallbackInfo<v8::Value>& args) 3470 static void methodWithOptionalStringIsUndefinedMethodCallback(const v8::Function CallbackInfo<v8::Value>& args)
3493 { 3471 {
3494 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3472 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3495 TestObjV8Internal::methodWithOptionalStringIsUndefinedMethod(args); 3473 TestObjV8Internal::methodWithOptionalStringIsUndefinedMethod(args);
3496 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3474 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3497 } 3475 }
3498 3476
3499 static void methodWithOptionalStringIsNullStringMethod(const v8::FunctionCallbac kInfo<v8::Value>& args) 3477 static void methodWithOptionalStringIsNullStringMethod(const v8::FunctionCallbac kInfo<v8::Value>& args)
3500 { 3478 {
3501 TestObj* imp = V8TestObject::toNative(args.Holder()); 3479 TestObj* imp = V8TestObject::toNative(args.Holder());
3502 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, argumentOrNull (args, 0)); 3480 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, argumentOrNull (args, 0));
3503 imp->methodWithOptionalStringIsNullString(str); 3481 imp->methodWithOptionalStringIsNullString(str);
3504
3505 return; 3482 return;
3506 } 3483 }
3507 3484
3508 static void methodWithOptionalStringIsNullStringMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& args) 3485 static void methodWithOptionalStringIsNullStringMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& args)
3509 { 3486 {
3510 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3487 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3511 TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(args); 3488 TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(args);
3512 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3489 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3513 } 3490 }
3514 3491
3515 static void methodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value >& args) 3492 static void methodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value >& args)
3516 { 3493 {
3517 if (UNLIKELY(args.Length() < 1)) { 3494 if (UNLIKELY(args.Length() < 1)) {
3518 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackArg ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate()); 3495 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackArg ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate());
3519 return; 3496 return;
3520 } 3497 }
3521 TestObj* imp = V8TestObject::toNative(args.Holder()); 3498 TestObj* imp = V8TestObject::toNative(args.Holder());
3522 if (args.Length() <= 0 || !args[0]->IsFunction()) { 3499 if (args.Length() <= 0 || !args[0]->IsFunction()) {
3523 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackArg ", "TestObject", "The callback provided as parameter 1 is not a function."), arg s.GetIsolate()); 3500 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackArg ", "TestObject", "The callback provided as parameter 1 is not a function."), arg s.GetIsolate());
3524 return; 3501 return;
3525 } 3502 }
3526 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getExecution Context()); 3503 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getExecution Context());
3527 imp->methodWithCallbackArg(callback); 3504 imp->methodWithCallbackArg(callback);
3528
3529 return; 3505 return;
3530 } 3506 }
3531 3507
3532 static void methodWithCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args) 3508 static void methodWithCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args)
3533 { 3509 {
3534 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3510 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3535 TestObjV8Internal::methodWithCallbackArgMethod(args); 3511 TestObjV8Internal::methodWithCallbackArgMethod(args);
3536 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3512 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3537 } 3513 }
3538 3514
3539 static void methodWithNonCallbackArgAndCallbackArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& args) 3515 static void methodWithNonCallbackArgAndCallbackArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& args)
3540 { 3516 {
3541 if (UNLIKELY(args.Length() < 2)) { 3517 if (UNLIKELY(args.Length() < 2)) {
3542 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackArg", "TestObject", ExceptionMessages::notEnoughArguments(2, args. Length())), args.GetIsolate()); 3518 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackArg", "TestObject", ExceptionMessages::notEnoughArguments(2, args. Length())), args.GetIsolate());
3543 return; 3519 return;
3544 } 3520 }
3545 TestObj* imp = V8TestObject::toNative(args.Holder()); 3521 TestObj* imp = V8TestObject::toNative(args.Holder());
3546 V8TRYCATCH_VOID(int, nonCallback, toInt32(args[0])); 3522 V8TRYCATCH_VOID(int, nonCallback, toInt32(args[0]));
3547 if (args.Length() <= 1 || !args[1]->IsFunction()) { 3523 if (args.Length() <= 1 || !args[1]->IsFunction()) {
3548 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackArg", "TestObject", "The callback provided as parameter 2 is not a function."), args.GetIsolate()); 3524 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackArg", "TestObject", "The callback provided as parameter 2 is not a function."), args.GetIsolate());
3549 return; 3525 return;
3550 } 3526 }
3551 RefPtr<TestCallback> callback = V8TestCallback::create(args[1], getExecution Context()); 3527 RefPtr<TestCallback> callback = V8TestCallback::create(args[1], getExecution Context());
3552 imp->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback); 3528 imp->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback);
3553
3554 return; 3529 return;
3555 } 3530 }
3556 3531
3557 static void methodWithNonCallbackArgAndCallbackArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& args) 3532 static void methodWithNonCallbackArgAndCallbackArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& args)
3558 { 3533 {
3559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3534 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3560 TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethod(args); 3535 TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethod(args);
3561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3536 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3562 } 3537 }
3563 3538
3564 static void methodWithCallbackAndOptionalArgMethod(const v8::FunctionCallbackInf o<v8::Value>& args) 3539 static void methodWithCallbackAndOptionalArgMethod(const v8::FunctionCallbackInf o<v8::Value>& args)
3565 { 3540 {
3566 TestObj* imp = V8TestObject::toNative(args.Holder()); 3541 TestObj* imp = V8TestObject::toNative(args.Holder());
3567 RefPtr<TestCallback> callback; 3542 RefPtr<TestCallback> callback;
3568 if (args.Length() > 0 && !args[0]->IsNull() && !args[0]->IsUndefined()) { 3543 if (args.Length() > 0 && !args[0]->IsNull() && !args[0]->IsUndefined()) {
3569 if (!args[0]->IsFunction()) { 3544 if (!args[0]->IsFunction()) {
3570 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbac kAndOptionalArg", "TestObject", "The callback provided as parameter 1 is not a f unction."), args.GetIsolate()); 3545 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbac kAndOptionalArg", "TestObject", "The callback provided as parameter 1 is not a f unction."), args.GetIsolate());
3571 return; 3546 return;
3572 } 3547 }
3573 callback = V8TestCallback::create(args[0], getExecutionContext()); 3548 callback = V8TestCallback::create(args[0], getExecutionContext());
3574 } 3549 }
3575 imp->methodWithCallbackAndOptionalArg(callback); 3550 imp->methodWithCallbackAndOptionalArg(callback);
3576
3577 return; 3551 return;
3578 } 3552 }
3579 3553
3580 static void methodWithCallbackAndOptionalArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& args) 3554 static void methodWithCallbackAndOptionalArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& args)
3581 { 3555 {
3582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3556 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3583 TestObjV8Internal::methodWithCallbackAndOptionalArgMethod(args); 3557 TestObjV8Internal::methodWithCallbackAndOptionalArgMethod(args);
3584 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3558 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3585 } 3559 }
3586 3560
3587 static void methodWithNullableCallbackArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& args) 3561 static void methodWithNullableCallbackArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& args)
3588 { 3562 {
3589 if (UNLIKELY(args.Length() < 1)) { 3563 if (UNLIKELY(args.Length() < 1)) {
3590 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal lbackArg", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length()) ), args.GetIsolate()); 3564 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal lbackArg", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length()) ), args.GetIsolate());
3591 return; 3565 return;
3592 } 3566 }
3593 TestObj* imp = V8TestObject::toNative(args.Holder()); 3567 TestObj* imp = V8TestObject::toNative(args.Holder());
3594 if (args.Length() <= 0 || !(args[0]->IsFunction() || args[0]->IsNull())) { 3568 if (args.Length() <= 0 || !(args[0]->IsFunction() || args[0]->IsNull())) {
3595 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal lbackArg", "TestObject", "The callback provided as parameter 1 is not a function ."), args.GetIsolate()); 3569 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal lbackArg", "TestObject", "The callback provided as parameter 1 is not a function ."), args.GetIsolate());
3596 return; 3570 return;
3597 } 3571 }
3598 RefPtr<TestCallback> callback = args[0]->IsNull() ? 0 : V8TestCallback::crea te(args[0], getExecutionContext()); 3572 RefPtr<TestCallback> callback = args[0]->IsNull() ? 0 : V8TestCallback::crea te(args[0], getExecutionContext());
3599 imp->methodWithNullableCallbackArg(callback); 3573 imp->methodWithNullableCallbackArg(callback);
3600
3601 return; 3574 return;
3602 } 3575 }
3603 3576
3604 static void methodWithNullableCallbackArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& args) 3577 static void methodWithNullableCallbackArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& args)
3605 { 3578 {
3606 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3579 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3607 TestObjV8Internal::methodWithNullableCallbackArgMethod(args); 3580 TestObjV8Internal::methodWithNullableCallbackArgMethod(args);
3608 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3581 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3609 } 3582 }
3610 3583
3611 static void staticMethodWithCallbackAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& args) 3584 static void staticMethodWithCallbackAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& args)
3612 { 3585 {
3613 RefPtr<TestCallback> callback; 3586 RefPtr<TestCallback> callback;
3614 if (args.Length() > 0 && !args[0]->IsNull() && !args[0]->IsUndefined()) { 3587 if (args.Length() > 0 && !args[0]->IsNull() && !args[0]->IsUndefined()) {
3615 if (!args[0]->IsFunction()) { 3588 if (!args[0]->IsFunction()) {
3616 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithC allbackAndOptionalArg", "TestObject", "The callback provided as parameter 1 is n ot a function."), args.GetIsolate()); 3589 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithC allbackAndOptionalArg", "TestObject", "The callback provided as parameter 1 is n ot a function."), args.GetIsolate());
3617 return; 3590 return;
3618 } 3591 }
3619 callback = V8TestCallback::create(args[0], getExecutionContext()); 3592 callback = V8TestCallback::create(args[0], getExecutionContext());
3620 } 3593 }
3621 TestObj::staticMethodWithCallbackAndOptionalArg(callback); 3594 TestObj::staticMethodWithCallbackAndOptionalArg(callback);
3622
3623 return; 3595 return;
3624 } 3596 }
3625 3597
3626 static void staticMethodWithCallbackAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& args) 3598 static void staticMethodWithCallbackAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& args)
3627 { 3599 {
3628 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3600 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3629 TestObjV8Internal::staticMethodWithCallbackAndOptionalArgMethod(args); 3601 TestObjV8Internal::staticMethodWithCallbackAndOptionalArgMethod(args);
3630 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3602 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3631 } 3603 }
3632 3604
3633 static void staticMethodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& args) 3605 static void staticMethodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& args)
3634 { 3606 {
3635 if (UNLIKELY(args.Length() < 1)) { 3607 if (UNLIKELY(args.Length() < 1)) {
3636 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallb ackArg", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()); 3608 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallb ackArg", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate());
3637 return; 3609 return;
3638 } 3610 }
3639 if (args.Length() <= 0 || !args[0]->IsFunction()) { 3611 if (args.Length() <= 0 || !args[0]->IsFunction()) {
3640 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallb ackArg", "TestObject", "The callback provided as parameter 1 is not a function." ), args.GetIsolate()); 3612 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallb ackArg", "TestObject", "The callback provided as parameter 1 is not a function." ), args.GetIsolate());
3641 return; 3613 return;
3642 } 3614 }
3643 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getExecution Context()); 3615 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getExecution Context());
3644 TestObj::staticMethodWithCallbackArg(callback); 3616 TestObj::staticMethodWithCallbackArg(callback);
3645
3646 return; 3617 return;
3647 } 3618 }
3648 3619
3649 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& args) 3620 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& args)
3650 { 3621 {
3651 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3622 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3652 TestObjV8Internal::staticMethodWithCallbackArgMethod(args); 3623 TestObjV8Internal::staticMethodWithCallbackArgMethod(args);
3653 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3624 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3654 } 3625 }
3655 3626
3656 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8:: Value>& args) 3627 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8:: Value>& args)
3657 { 3628 {
3658 if (UNLIKELY(args.Length() < 1)) { 3629 if (UNLIKELY(args.Length() < 1)) {
3659 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()); 3630 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate());
3660 return; 3631 return;
3661 } 3632 }
3662 TestObj* imp = V8TestObject::toNative(args.Holder()); 3633 TestObj* imp = V8TestObject::toNative(args.Holder());
3663 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt8(args[0], EnforceRange, ok) , args.GetIsolate()); 3634 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt8(args[0], EnforceRange, ok) , args.GetIsolate());
3664 imp->methodWithEnforceRangeInt8(value); 3635 imp->methodWithEnforceRangeInt8(value);
3665
3666 return; 3636 return;
3667 } 3637 }
3668 3638
3669 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& args) 3639 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& args)
3670 { 3640 {
3671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3641 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3672 TestObjV8Internal::methodWithEnforceRangeInt8Method(args); 3642 TestObjV8Internal::methodWithEnforceRangeInt8Method(args);
3673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3643 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3674 } 3644 }
3675 3645
3676 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8: :Value>& args) 3646 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8: :Value>& args)
3677 { 3647 {
3678 if (UNLIKELY(args.Length() < 1)) { 3648 if (UNLIKELY(args.Length() < 1)) {
3679 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()); 3649 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate());
3680 return; 3650 return;
3681 } 3651 }
3682 TestObj* imp = V8TestObject::toNative(args.Holder()); 3652 TestObj* imp = V8TestObject::toNative(args.Holder());
3683 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt8(args[0], EnforceRang e, ok), args.GetIsolate()); 3653 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt8(args[0], EnforceRang e, ok), args.GetIsolate());
3684 imp->methodWithEnforceRangeUInt8(value); 3654 imp->methodWithEnforceRangeUInt8(value);
3685
3686 return; 3655 return;
3687 } 3656 }
3688 3657
3689 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback Info<v8::Value>& args) 3658 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback Info<v8::Value>& args)
3690 { 3659 {
3691 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3660 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3692 TestObjV8Internal::methodWithEnforceRangeUInt8Method(args); 3661 TestObjV8Internal::methodWithEnforceRangeUInt8Method(args);
3693 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3662 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3694 } 3663 }
3695 3664
3696 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8: :Value>& args) 3665 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8: :Value>& args)
3697 { 3666 {
3698 if (UNLIKELY(args.Length() < 1)) { 3667 if (UNLIKELY(args.Length() < 1)) {
3699 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()); 3668 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate());
3700 return; 3669 return;
3701 } 3670 }
3702 TestObj* imp = V8TestObject::toNative(args.Holder()); 3671 TestObj* imp = V8TestObject::toNative(args.Holder());
3703 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt32(args[0], EnforceRange, ok ), args.GetIsolate()); 3672 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt32(args[0], EnforceRange, ok ), args.GetIsolate());
3704 imp->methodWithEnforceRangeInt32(value); 3673 imp->methodWithEnforceRangeInt32(value);
3705
3706 return; 3674 return;
3707 } 3675 }
3708 3676
3709 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback Info<v8::Value>& args) 3677 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback Info<v8::Value>& args)
3710 { 3678 {
3711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3679 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3712 TestObjV8Internal::methodWithEnforceRangeInt32Method(args); 3680 TestObjV8Internal::methodWithEnforceRangeInt32Method(args);
3713 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3681 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3714 } 3682 }
3715 3683
3716 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8 ::Value>& args) 3684 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8 ::Value>& args)
3717 { 3685 {
3718 if (UNLIKELY(args.Length() < 1)) { 3686 if (UNLIKELY(args.Length() < 1)) {
3719 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())) , args.GetIsolate()); 3687 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())) , args.GetIsolate());
3720 return; 3688 return;
3721 } 3689 }
3722 TestObj* imp = V8TestObject::toNative(args.Holder()); 3690 TestObj* imp = V8TestObject::toNative(args.Holder());
3723 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt32(args[0], EnforceRan ge, ok), args.GetIsolate()); 3691 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt32(args[0], EnforceRan ge, ok), args.GetIsolate());
3724 imp->methodWithEnforceRangeUInt32(value); 3692 imp->methodWithEnforceRangeUInt32(value);
3725
3726 return; 3693 return;
3727 } 3694 }
3728 3695
3729 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& args) 3696 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& args)
3730 { 3697 {
3731 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3698 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3732 TestObjV8Internal::methodWithEnforceRangeUInt32Method(args); 3699 TestObjV8Internal::methodWithEnforceRangeUInt32Method(args);
3733 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3700 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3734 } 3701 }
3735 3702
3736 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8: :Value>& args) 3703 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8: :Value>& args)
3737 { 3704 {
3738 if (UNLIKELY(args.Length() < 1)) { 3705 if (UNLIKELY(args.Length() < 1)) {
3739 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()); 3706 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate());
3740 return; 3707 return;
3741 } 3708 }
3742 TestObj* imp = V8TestObject::toNative(args.Holder()); 3709 TestObj* imp = V8TestObject::toNative(args.Holder());
3743 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, value, toInt64(args[0], EnforceRan ge, ok), args.GetIsolate()); 3710 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, value, toInt64(args[0], EnforceRan ge, ok), args.GetIsolate());
3744 imp->methodWithEnforceRangeInt64(value); 3711 imp->methodWithEnforceRangeInt64(value);
3745
3746 return; 3712 return;
3747 } 3713 }
3748 3714
3749 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback Info<v8::Value>& args) 3715 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback Info<v8::Value>& args)
3750 { 3716 {
3751 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3717 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3752 TestObjV8Internal::methodWithEnforceRangeInt64Method(args); 3718 TestObjV8Internal::methodWithEnforceRangeInt64Method(args);
3753 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3719 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3754 } 3720 }
3755 3721
3756 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8 ::Value>& args) 3722 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8 ::Value>& args)
3757 { 3723 {
3758 if (UNLIKELY(args.Length() < 1)) { 3724 if (UNLIKELY(args.Length() < 1)) {
3759 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())) , args.GetIsolate()); 3725 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())) , args.GetIsolate());
3760 return; 3726 return;
3761 } 3727 }
3762 TestObj* imp = V8TestObject::toNative(args.Holder()); 3728 TestObj* imp = V8TestObject::toNative(args.Holder());
3763 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, value, toUInt64(args[0], EnforceRange, ok), args.GetIsolate()); 3729 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, value, toUInt64(args[0], EnforceRange, ok), args.GetIsolate());
3764 imp->methodWithEnforceRangeUInt64(value); 3730 imp->methodWithEnforceRangeUInt64(value);
3765
3766 return; 3731 return;
3767 } 3732 }
3768 3733
3769 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& args) 3734 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& args)
3770 { 3735 {
3771 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3736 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3772 TestObjV8Internal::methodWithEnforceRangeUInt64Method(args); 3737 TestObjV8Internal::methodWithEnforceRangeUInt64Method(args);
3773 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3738 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3774 } 3739 }
3775 3740
(...skipping 18 matching lines...) Expand all
3794 } 3759 }
3795 3760
3796 #endif // ENABLE(Condition1) 3761 #endif // ENABLE(Condition1)
3797 3762
3798 #if ENABLE(Condition1) && ENABLE(Condition2) 3763 #if ENABLE(Condition1) && ENABLE(Condition2)
3799 3764
3800 static void conditionalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args) 3765 static void conditionalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
3801 { 3766 {
3802 TestObj* imp = V8TestObject::toNative(args.Holder()); 3767 TestObj* imp = V8TestObject::toNative(args.Holder());
3803 imp->conditionalMethod2(); 3768 imp->conditionalMethod2();
3804
3805 return; 3769 return;
3806 } 3770 }
3807 3771
3808 #endif // ENABLE(Condition1) && ENABLE(Condition2) 3772 #endif // ENABLE(Condition1) && ENABLE(Condition2)
3809 3773
3810 #if ENABLE(Condition1) && ENABLE(Condition2) 3774 #if ENABLE(Condition1) && ENABLE(Condition2)
3811 3775
3812 static void conditionalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args) 3776 static void conditionalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args)
3813 { 3777 {
3814 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3778 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3815 TestObjV8Internal::conditionalMethod2Method(args); 3779 TestObjV8Internal::conditionalMethod2Method(args);
3816 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3780 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3817 } 3781 }
3818 3782
3819 #endif // ENABLE(Condition1) && ENABLE(Condition2) 3783 #endif // ENABLE(Condition1) && ENABLE(Condition2)
3820 3784
3821 #if ENABLE(Condition1) || ENABLE(Condition2) 3785 #if ENABLE(Condition1) || ENABLE(Condition2)
3822 3786
3823 static void conditionalMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& args) 3787 static void conditionalMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& args)
3824 { 3788 {
3825 TestObj* imp = V8TestObject::toNative(args.Holder()); 3789 TestObj* imp = V8TestObject::toNative(args.Holder());
3826 imp->conditionalMethod3(); 3790 imp->conditionalMethod3();
3827
3828 return; 3791 return;
3829 } 3792 }
3830 3793
3831 #endif // ENABLE(Condition1) || ENABLE(Condition2) 3794 #endif // ENABLE(Condition1) || ENABLE(Condition2)
3832 3795
3833 #if ENABLE(Condition1) || ENABLE(Condition2) 3796 #if ENABLE(Condition1) || ENABLE(Condition2)
3834 3797
3835 static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args) 3798 static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args)
3836 { 3799 {
3837 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3800 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
(...skipping 19 matching lines...) Expand all
3857 3820
3858 static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Va lue>& args) 3821 static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Va lue>& args)
3859 { 3822 {
3860 if (UNLIKELY(args.Length() < 1)) { 3823 if (UNLIKELY(args.Length() < 1)) {
3861 throwTypeError(ExceptionMessages::failedToExecute("callbackFunctionArgum ent", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), ar gs.GetIsolate()); 3824 throwTypeError(ExceptionMessages::failedToExecute("callbackFunctionArgum ent", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), ar gs.GetIsolate());
3862 return; 3825 return;
3863 } 3826 }
3864 TestObj* imp = V8TestObject::toNative(args.Holder()); 3827 TestObj* imp = V8TestObject::toNative(args.Holder());
3865 V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(args[0], args.GetIsolate( ))); 3828 V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(args[0], args.GetIsolate( )));
3866 imp->callbackFunctionArgument(function); 3829 imp->callbackFunctionArgument(function);
3867
3868 return; 3830 return;
3869 } 3831 }
3870 3832
3871 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& args) 3833 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& args)
3872 { 3834 {
3873 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3835 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3874 TestObjV8Internal::callbackFunctionArgumentMethod(args); 3836 TestObjV8Internal::callbackFunctionArgumentMethod(args);
3875 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3837 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3876 } 3838 }
3877 3839
3878 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 3840 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
3879 { 3841 {
3880 if (UNLIKELY(args.Length() < 2)) { 3842 if (UNLIKELY(args.Length() < 2)) {
3881 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(2, args.Length())), args.GetIs olate()); 3843 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(2, args.Length())), args.GetIs olate());
3882 return; 3844 return;
3883 } 3845 }
3884 TestObj* imp = V8TestObject::toNative(args.Holder()); 3846 TestObj* imp = V8TestObject::toNative(args.Holder());
3885 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[0])) : 0); 3847 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[0])) : 0);
3886 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); 3848 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]);
3887 imp->overloadedMethod(objArg, strArg); 3849 imp->overloadedMethod(objArg, strArg);
3888
3889 return; 3850 return;
3890 } 3851 }
3891 3852
3892 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 3853 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
3893 { 3854 {
3894 if (UNLIKELY(args.Length() < 1)) { 3855 if (UNLIKELY(args.Length() < 1)) {
3895 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate()); 3856 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate());
3896 return; 3857 return;
3897 } 3858 }
3898 TestObj* imp = V8TestObject::toNative(args.Holder()); 3859 TestObj* imp = V8TestObject::toNative(args.Holder());
3899 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[0])) : 0); 3860 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[0])) : 0);
3900 if (UNLIKELY(args.Length() <= 1)) { 3861 if (UNLIKELY(args.Length() <= 1)) {
3901 imp->overloadedMethod(objArg); 3862 imp->overloadedMethod(objArg);
3902
3903 return; 3863 return;
3904 } 3864 }
3905 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); 3865 V8TRYCATCH_VOID(int, longArg, toInt32(args[1]));
3906 imp->overloadedMethod(objArg, longArg); 3866 imp->overloadedMethod(objArg, longArg);
3907
3908 return; 3867 return;
3909 } 3868 }
3910 3869
3911 static void overloadedMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 3870 static void overloadedMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
3912 { 3871 {
3913 if (UNLIKELY(args.Length() < 1)) { 3872 if (UNLIKELY(args.Length() < 1)) {
3914 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate()); 3873 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate());
3915 return; 3874 return;
3916 } 3875 }
3917 TestObj* imp = V8TestObject::toNative(args.Holder()); 3876 TestObj* imp = V8TestObject::toNative(args.Holder());
3918 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 3877 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
3919 imp->overloadedMethod(strArg); 3878 imp->overloadedMethod(strArg);
3920
3921 return; 3879 return;
3922 } 3880 }
3923 3881
3924 static void overloadedMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 3882 static void overloadedMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
3925 { 3883 {
3926 if (UNLIKELY(args.Length() < 1)) { 3884 if (UNLIKELY(args.Length() < 1)) {
3927 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate()); 3885 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate());
3928 return; 3886 return;
3929 } 3887 }
3930 TestObj* imp = V8TestObject::toNative(args.Holder()); 3888 TestObj* imp = V8TestObject::toNative(args.Holder());
3931 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 3889 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
3932 imp->overloadedMethod(longArg); 3890 imp->overloadedMethod(longArg);
3933
3934 return; 3891 return;
3935 } 3892 }
3936 3893
3937 static void overloadedMethod5Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 3894 static void overloadedMethod5Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
3938 { 3895 {
3939 if (UNLIKELY(args.Length() < 1)) { 3896 if (UNLIKELY(args.Length() < 1)) {
3940 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate()); 3897 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate());
3941 return; 3898 return;
3942 } 3899 }
3943 TestObj* imp = V8TestObject::toNative(args.Holder()); 3900 TestObj* imp = V8TestObject::toNative(args.Holder());
3944 if (args.Length() <= 0 || !args[0]->IsFunction()) { 3901 if (args.Length() <= 0 || !args[0]->IsFunction()) {
3945 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", "The callback provided as parameter 1 is not a function."), args.Get Isolate()); 3902 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", "The callback provided as parameter 1 is not a function."), args.Get Isolate());
3946 return; 3903 return;
3947 } 3904 }
3948 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getExecution Context()); 3905 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getExecution Context());
3949 imp->overloadedMethod(callback); 3906 imp->overloadedMethod(callback);
3950
3951 return; 3907 return;
3952 } 3908 }
3953 3909
3954 static void overloadedMethod6Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 3910 static void overloadedMethod6Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
3955 { 3911 {
3956 if (UNLIKELY(args.Length() < 1)) { 3912 if (UNLIKELY(args.Length() < 1)) {
3957 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate()); 3913 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate());
3958 return; 3914 return;
3959 } 3915 }
3960 TestObj* imp = V8TestObject::toNative(args.Holder()); 3916 TestObj* imp = V8TestObject::toNative(args.Holder());
3961 V8TRYCATCH_VOID(RefPtr<DOMStringList>, listArg, toDOMStringList(args[0], arg s.GetIsolate())); 3917 V8TRYCATCH_VOID(RefPtr<DOMStringList>, listArg, toDOMStringList(args[0], arg s.GetIsolate()));
3962 imp->overloadedMethod(listArg); 3918 imp->overloadedMethod(listArg);
3963
3964 return; 3919 return;
3965 } 3920 }
3966 3921
3967 static void overloadedMethod7Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 3922 static void overloadedMethod7Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
3968 { 3923 {
3969 if (UNLIKELY(args.Length() < 1)) { 3924 if (UNLIKELY(args.Length() < 1)) {
3970 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate()); 3925 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate());
3971 return; 3926 return;
3972 } 3927 }
3973 TestObj* imp = V8TestObject::toNative(args.Holder()); 3928 TestObj* imp = V8TestObject::toNative(args.Holder());
3974 bool arrayArgIsNull = args[0]->IsNull(); 3929 bool arrayArgIsNull = args[0]->IsNull();
3975 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], 1, args.GetIsolate())); 3930 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], 1, args.GetIsolate()));
3976 imp->overloadedMethod(arrayArgIsNull ? 0 : &arrayArg); 3931 imp->overloadedMethod(arrayArgIsNull ? 0 : &arrayArg);
3977
3978 return; 3932 return;
3979 } 3933 }
3980 3934
3981 static void overloadedMethod8Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 3935 static void overloadedMethod8Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
3982 { 3936 {
3983 if (UNLIKELY(args.Length() < 1)) { 3937 if (UNLIKELY(args.Length() < 1)) {
3984 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate()); 3938 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate());
3985 return; 3939 return;
3986 } 3940 }
3987 TestObj* imp = V8TestObject::toNative(args.Holder()); 3941 TestObj* imp = V8TestObject::toNative(args.Holder());
3988 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[0])) : 0); 3942 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[0])) : 0);
3989 imp->overloadedMethod(objArg); 3943 imp->overloadedMethod(objArg);
3990
3991 return; 3944 return;
3992 } 3945 }
3993 3946
3994 static void overloadedMethod9Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 3947 static void overloadedMethod9Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
3995 { 3948 {
3996 if (UNLIKELY(args.Length() < 1)) { 3949 if (UNLIKELY(args.Length() < 1)) {
3997 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate()); 3950 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate());
3998 return; 3951 return;
3999 } 3952 }
4000 TestObj* imp = V8TestObject::toNative(args.Holder()); 3953 TestObj* imp = V8TestObject::toNative(args.Holder());
4001 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], 1, args.GetIsolate())); 3954 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], 1, args.GetIsolate()));
4002 imp->overloadedMethod(arrayArg); 3955 imp->overloadedMethod(arrayArg);
4003
4004 return; 3956 return;
4005 } 3957 }
4006 3958
4007 static void overloadedMethod10Method(const v8::FunctionCallbackInfo<v8::Value>& args) 3959 static void overloadedMethod10Method(const v8::FunctionCallbackInfo<v8::Value>& args)
4008 { 3960 {
4009 if (UNLIKELY(args.Length() < 1)) { 3961 if (UNLIKELY(args.Length() < 1)) {
4010 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate()); 3962 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate());
4011 return; 3963 return;
4012 } 3964 }
4013 TestObj* imp = V8TestObject::toNative(args.Holder()); 3965 TestObj* imp = V8TestObject::toNative(args.Holder());
4014 V8TRYCATCH_VOID(Vector<unsigned>, arrayArg, toNativeArray<unsigned>(args[0], 1, args.GetIsolate())); 3966 V8TRYCATCH_VOID(Vector<unsigned>, arrayArg, toNativeArray<unsigned>(args[0], 1, args.GetIsolate()));
4015 imp->overloadedMethod(arrayArg); 3967 imp->overloadedMethod(arrayArg);
4016
4017 return; 3968 return;
4018 } 3969 }
4019 3970
4020 static void overloadedMethod11Method(const v8::FunctionCallbackInfo<v8::Value>& args) 3971 static void overloadedMethod11Method(const v8::FunctionCallbackInfo<v8::Value>& args)
4021 { 3972 {
4022 if (UNLIKELY(args.Length() < 1)) { 3973 if (UNLIKELY(args.Length() < 1)) {
4023 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate()); 3974 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs olate());
4024 return; 3975 return;
4025 } 3976 }
4026 TestObj* imp = V8TestObject::toNative(args.Holder()); 3977 TestObj* imp = V8TestObject::toNative(args.Holder());
4027 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 3978 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
4028 imp->overloadedMethod(strArg); 3979 imp->overloadedMethod(strArg);
4029
4030 return; 3980 return;
4031 } 3981 }
4032 3982
4033 static void overloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& ar gs) 3983 static void overloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& ar gs)
4034 { 3984 {
4035 if ((args.Length() == 2 && (args[0]->IsNull() || V8TestObject::HasInstance(a rgs[0], args.GetIsolate(), worldType(args.GetIsolate()))) && (args[1]->IsNull() || args[1]->IsUndefined() || args[1]->IsString() || args[1]->IsObject()))) { 3985 if ((args.Length() == 2 && (args[0]->IsNull() || V8TestObject::HasInstance(a rgs[0], args.GetIsolate(), worldType(args.GetIsolate()))) && (args[1]->IsNull() || args[1]->IsUndefined() || args[1]->IsString() || args[1]->IsObject()))) {
4036 overloadedMethod1Method(args); 3986 overloadedMethod1Method(args);
4037 return; 3987 return;
4038 } 3988 }
4039 if ((args.Length() == 1 && (args[0]->IsNull() || V8TestObject::HasInstance(a rgs[0], args.GetIsolate(), worldType(args.GetIsolate())))) || (args.Length() == 2 && (args[0]->IsNull() || V8TestObject::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate()))))) { 3989 if ((args.Length() == 1 && (args[0]->IsNull() || V8TestObject::HasInstance(a rgs[0], args.GetIsolate(), worldType(args.GetIsolate())))) || (args.Length() == 2 && (args[0]->IsNull() || V8TestObject::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate()))))) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
4086 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& args) 4036 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& args)
4087 { 4037 {
4088 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4038 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4089 TestObjV8Internal::overloadedMethodMethod(args); 4039 TestObjV8Internal::overloadedMethodMethod(args);
4090 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4040 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4091 } 4041 }
4092 4042
4093 static void classMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 4043 static void classMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
4094 { 4044 {
4095 TestObj::classMethod(); 4045 TestObj::classMethod();
4096
4097 return; 4046 return;
4098 } 4047 }
4099 4048
4100 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) 4049 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
4101 { 4050 {
4102 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4051 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4103 TestObjV8Internal::classMethodMethod(args); 4052 TestObjV8Internal::classMethodMethod(args);
4104 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4053 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4105 } 4054 }
4106 4055
(...skipping 25 matching lines...) Expand all
4132 #if ENABLE(Condition1) 4081 #if ENABLE(Condition1)
4133 4082
4134 static void overloadedMethod11Method(const v8::FunctionCallbackInfo<v8::Value>& args) 4083 static void overloadedMethod11Method(const v8::FunctionCallbackInfo<v8::Value>& args)
4135 { 4084 {
4136 if (UNLIKELY(args.Length() < 1)) { 4085 if (UNLIKELY(args.Length() < 1)) {
4137 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod1", " TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetI solate()); 4086 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod1", " TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetI solate());
4138 return; 4087 return;
4139 } 4088 }
4140 V8TRYCATCH_VOID(int, arg, toInt32(args[0])); 4089 V8TRYCATCH_VOID(int, arg, toInt32(args[0]));
4141 TestObj::overloadedMethod1(arg); 4090 TestObj::overloadedMethod1(arg);
4142
4143 return; 4091 return;
4144 } 4092 }
4145 4093
4146 #endif // ENABLE(Condition1) 4094 #endif // ENABLE(Condition1)
4147 4095
4148 #if ENABLE(Condition1) 4096 #if ENABLE(Condition1)
4149 4097
4150 static void overloadedMethod12Method(const v8::FunctionCallbackInfo<v8::Value>& args) 4098 static void overloadedMethod12Method(const v8::FunctionCallbackInfo<v8::Value>& args)
4151 { 4099 {
4152 if (UNLIKELY(args.Length() < 1)) { 4100 if (UNLIKELY(args.Length() < 1)) {
4153 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod1", " TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetI solate()); 4101 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod1", " TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetI solate());
4154 return; 4102 return;
4155 } 4103 }
4156 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, args[0]); 4104 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, args[0]);
4157 TestObj::overloadedMethod1(type); 4105 TestObj::overloadedMethod1(type);
4158
4159 return; 4106 return;
4160 } 4107 }
4161 4108
4162 #endif // ENABLE(Condition1) 4109 #endif // ENABLE(Condition1)
4163 4110
4164 #if ENABLE(Condition1) 4111 #if ENABLE(Condition1)
4165 4112
4166 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 4113 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
4167 { 4114 {
4168 if (args.Length() == 1) { 4115 if (args.Length() == 1) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4202 TestObj* imp = V8TestObject::toNative(args.Holder()); 4149 TestObj* imp = V8TestObject::toNative(args.Holder());
4203 unsigned short objArgsShort = 0; 4150 unsigned short objArgsShort = 0;
4204 V8TRYCATCH_VOID(double, objArgsShortNativeValue, args[0]->NumberValue()); 4151 V8TRYCATCH_VOID(double, objArgsShortNativeValue, args[0]->NumberValue());
4205 if (!std::isnan(objArgsShortNativeValue)) 4152 if (!std::isnan(objArgsShortNativeValue))
4206 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); 4153 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue);
4207 unsigned long objArgsLong = 0; 4154 unsigned long objArgsLong = 0;
4208 V8TRYCATCH_VOID(double, objArgsLongNativeValue, args[1]->NumberValue()); 4155 V8TRYCATCH_VOID(double, objArgsLongNativeValue, args[1]->NumberValue());
4209 if (!std::isnan(objArgsLongNativeValue)) 4156 if (!std::isnan(objArgsLongNativeValue))
4210 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); 4157 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue);
4211 imp->classMethodWithClamp(objArgsShort, objArgsLong); 4158 imp->classMethodWithClamp(objArgsShort, objArgsLong);
4212
4213 return; 4159 return;
4214 } 4160 }
4215 4161
4216 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args) 4162 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args)
4217 { 4163 {
4218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4219 TestObjV8Internal::classMethodWithClampMethod(args); 4165 TestObjV8Internal::classMethodWithClampMethod(args);
4220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4166 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4221 } 4167 }
4222 4168
4223 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& args) 4169 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& args)
4224 { 4170 {
4225 if (UNLIKELY(args.Length() < 1)) { 4171 if (UNLIKELY(args.Length() < 1)) {
4226 throwTypeError(ExceptionMessages::failedToExecute("enabledAtRuntimeMetho d", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args .GetIsolate()); 4172 throwTypeError(ExceptionMessages::failedToExecute("enabledAtRuntimeMetho d", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args .GetIsolate());
4227 return; 4173 return;
4228 } 4174 }
4229 TestObj* imp = V8TestObject::toNative(args.Holder()); 4175 TestObj* imp = V8TestObject::toNative(args.Holder());
4230 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4176 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4231 imp->enabledAtRuntimeMethod(longArg); 4177 imp->enabledAtRuntimeMethod(longArg);
4232
4233 return; 4178 return;
4234 } 4179 }
4235 4180
4236 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& args) 4181 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& args)
4237 { 4182 {
4238 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4239 TestObjV8Internal::enabledAtRuntimeMethodMethod(args); 4184 TestObjV8Internal::enabledAtRuntimeMethodMethod(args);
4240 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4241 } 4186 }
4242 4187
4243 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& args) 4188 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& args)
4244 { 4189 {
4245 if (UNLIKELY(args.Length() < 1)) { 4190 if (UNLIKELY(args.Length() < 1)) {
4246 throwTypeError(ExceptionMessages::failedToExecute("enabledPerContextMeth od", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), arg s.GetIsolate()); 4191 throwTypeError(ExceptionMessages::failedToExecute("enabledPerContextMeth od", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), arg s.GetIsolate());
4247 return; 4192 return;
4248 } 4193 }
4249 TestObj* imp = V8TestObject::toNative(args.Holder()); 4194 TestObj* imp = V8TestObject::toNative(args.Holder());
4250 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4195 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4251 imp->enabledPerContextMethod(longArg); 4196 imp->enabledPerContextMethod(longArg);
4252
4253 return; 4197 return;
4254 } 4198 }
4255 4199
4256 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& args) 4200 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& args)
4257 { 4201 {
4258 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4202 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4259 TestObjV8Internal::enabledPerContextMethodMethod(args); 4203 TestObjV8Internal::enabledPerContextMethodMethod(args);
4260 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4204 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4261 } 4205 }
4262 4206
4263 static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo< v8::Value>& args) 4207 static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo< v8::Value>& args)
4264 { 4208 {
4265 if (UNLIKELY(args.Length() < 1)) { 4209 if (UNLIKELY(args.Length() < 1)) {
4266 throwTypeError(ExceptionMessages::failedToExecute("methodWithUnsignedLon gSequence", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length() )), args.GetIsolate()); 4210 throwTypeError(ExceptionMessages::failedToExecute("methodWithUnsignedLon gSequence", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length() )), args.GetIsolate());
4267 return; 4211 return;
4268 } 4212 }
4269 TestObj* imp = V8TestObject::toNative(args.Holder()); 4213 TestObj* imp = V8TestObject::toNative(args.Holder());
4270 V8TRYCATCH_VOID(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsign ed>(args[0], 1, args.GetIsolate())); 4214 V8TRYCATCH_VOID(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsign ed>(args[0], 1, args.GetIsolate()));
4271 imp->methodWithUnsignedLongSequence(unsignedLongSequence); 4215 imp->methodWithUnsignedLongSequence(unsignedLongSequence);
4272
4273 return; 4216 return;
4274 } 4217 }
4275 4218
4276 static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& args) 4219 static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& args)
4277 { 4220 {
4278 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4221 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4279 TestObjV8Internal::methodWithUnsignedLongSequenceMethod(args); 4222 TestObjV8Internal::methodWithUnsignedLongSequenceMethod(args);
4280 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4223 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4281 } 4224 }
4282 4225
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
4351 4294
4352 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& args) 4295 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
4353 { 4296 {
4354 if (UNLIKELY(args.Length() < 1)) { 4297 if (UNLIKELY(args.Length() < 1)) {
4355 throwTypeError(ExceptionMessages::failedToExecute("convert1", "TestObjec t", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()) ; 4298 throwTypeError(ExceptionMessages::failedToExecute("convert1", "TestObjec t", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()) ;
4356 return; 4299 return;
4357 } 4300 }
4358 TestObj* imp = V8TestObject::toNative(args.Holder()); 4301 TestObj* imp = V8TestObject::toNative(args.Holder());
4359 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetI solate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(args[0])) : 0); 4302 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetI solate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(args[0])) : 0);
4360 imp->convert1(value); 4303 imp->convert1(value);
4361
4362 return; 4304 return;
4363 } 4305 }
4364 4306
4365 static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar gs) 4307 static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar gs)
4366 { 4308 {
4367 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4309 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4368 TestObjV8Internal::convert1Method(args); 4310 TestObjV8Internal::convert1Method(args);
4369 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4311 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4370 } 4312 }
4371 4313
4372 static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& args) 4314 static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
4373 { 4315 {
4374 if (UNLIKELY(args.Length() < 1)) { 4316 if (UNLIKELY(args.Length() < 1)) {
4375 throwTypeError(ExceptionMessages::failedToExecute("convert2", "TestObjec t", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()) ; 4317 throwTypeError(ExceptionMessages::failedToExecute("convert2", "TestObjec t", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()) ;
4376 return; 4318 return;
4377 } 4319 }
4378 TestObj* imp = V8TestObject::toNative(args.Holder()); 4320 TestObj* imp = V8TestObject::toNative(args.Holder());
4379 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetI solate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(args[0])) : 0); 4321 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetI solate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(args[0])) : 0);
4380 imp->convert2(value); 4322 imp->convert2(value);
4381
4382 return; 4323 return;
4383 } 4324 }
4384 4325
4385 static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar gs) 4326 static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar gs)
4386 { 4327 {
4387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4328 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4388 TestObjV8Internal::convert2Method(args); 4329 TestObjV8Internal::convert2Method(args);
4389 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4330 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4390 } 4331 }
4391 4332
4392 static void convert4Method(const v8::FunctionCallbackInfo<v8::Value>& args) 4333 static void convert4Method(const v8::FunctionCallbackInfo<v8::Value>& args)
4393 { 4334 {
4394 if (UNLIKELY(args.Length() < 1)) { 4335 if (UNLIKELY(args.Length() < 1)) {
4395 throwTypeError(ExceptionMessages::failedToExecute("convert4", "TestObjec t", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()) ; 4336 throwTypeError(ExceptionMessages::failedToExecute("convert4", "TestObjec t", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()) ;
4396 return; 4337 return;
4397 } 4338 }
4398 TestObj* imp = V8TestObject::toNative(args.Holder()); 4339 TestObj* imp = V8TestObject::toNative(args.Holder());
4399 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetI solate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(args[0])) : 0); 4340 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetI solate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(args[0])) : 0);
4400 imp->convert4(value); 4341 imp->convert4(value);
4401
4402 return; 4342 return;
4403 } 4343 }
4404 4344
4405 static void convert4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar gs) 4345 static void convert4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar gs)
4406 { 4346 {
4407 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4347 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4408 TestObjV8Internal::convert4Method(args); 4348 TestObjV8Internal::convert4Method(args);
4409 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4349 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4410 } 4350 }
4411 4351
4412 static void convert5Method(const v8::FunctionCallbackInfo<v8::Value>& args) 4352 static void convert5Method(const v8::FunctionCallbackInfo<v8::Value>& args)
4413 { 4353 {
4414 if (UNLIKELY(args.Length() < 1)) { 4354 if (UNLIKELY(args.Length() < 1)) {
4415 throwTypeError(ExceptionMessages::failedToExecute("convert5", "TestObjec t", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()) ; 4355 throwTypeError(ExceptionMessages::failedToExecute("convert5", "TestObjec t", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()) ;
4416 return; 4356 return;
4417 } 4357 }
4418 TestObj* imp = V8TestObject::toNative(args.Holder()); 4358 TestObj* imp = V8TestObject::toNative(args.Holder());
4419 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetI solate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(args[0])) : 0); 4359 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetI solate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(args[0])) : 0);
4420 imp->convert5(value); 4360 imp->convert5(value);
4421
4422 return; 4361 return;
4423 } 4362 }
4424 4363
4425 static void convert5MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar gs) 4364 static void convert5MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar gs)
4426 { 4365 {
4427 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4366 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4428 TestObjV8Internal::convert5Method(args); 4367 TestObjV8Internal::convert5Method(args);
4429 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4368 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4430 } 4369 }
4431 4370
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
4510 { 4449 {
4511 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4450 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4512 TestObjV8Internal::strictSVGPointMethodMethod(args); 4451 TestObjV8Internal::strictSVGPointMethodMethod(args);
4513 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4452 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4514 } 4453 }
4515 4454
4516 static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 4455 static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
4517 { 4456 {
4518 TestObj* imp = V8TestObject::toNative(args.Holder()); 4457 TestObj* imp = V8TestObject::toNative(args.Holder());
4519 imp->banana(); 4458 imp->banana();
4520
4521 return; 4459 return;
4522 } 4460 }
4523 4461
4524 static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args ) 4462 static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args )
4525 { 4463 {
4526 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4464 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4527 TestObjV8Internal::orangeMethod(args); 4465 TestObjV8Internal::orangeMethod(args);
4528 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4466 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4529 } 4467 }
4530 4468
(...skipping 25 matching lines...) Expand all
4556 static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & args) 4494 static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & args)
4557 { 4495 {
4558 if (UNLIKELY(args.Length() < 1)) { 4496 if (UNLIKELY(args.Length() < 1)) {
4559 throwTypeError(ExceptionMessages::failedToExecute("variadicStringMethod" , "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.G etIsolate()); 4497 throwTypeError(ExceptionMessages::failedToExecute("variadicStringMethod" , "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.G etIsolate());
4560 return; 4498 return;
4561 } 4499 }
4562 TestObj* imp = V8TestObject::toNative(args.Holder()); 4500 TestObj* imp = V8TestObject::toNative(args.Holder());
4563 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, head, args[0]); 4501 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, head, args[0]);
4564 V8TRYCATCH_VOID(Vector<String>, tail, toNativeArguments<String>(args, 1)); 4502 V8TRYCATCH_VOID(Vector<String>, tail, toNativeArguments<String>(args, 1));
4565 imp->variadicStringMethod(head, tail); 4503 imp->variadicStringMethod(head, tail);
4566
4567 return; 4504 return;
4568 } 4505 }
4569 4506
4570 static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args) 4507 static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args)
4571 { 4508 {
4572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4509 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4573 TestObjV8Internal::variadicStringMethodMethod(args); 4510 TestObjV8Internal::variadicStringMethodMethod(args);
4574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4511 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4575 } 4512 }
4576 4513
4577 static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & args) 4514 static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & args)
4578 { 4515 {
4579 if (UNLIKELY(args.Length() < 1)) { 4516 if (UNLIKELY(args.Length() < 1)) {
4580 throwTypeError(ExceptionMessages::failedToExecute("variadicDoubleMethod" , "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.G etIsolate()); 4517 throwTypeError(ExceptionMessages::failedToExecute("variadicDoubleMethod" , "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.G etIsolate());
4581 return; 4518 return;
4582 } 4519 }
4583 TestObj* imp = V8TestObject::toNative(args.Holder()); 4520 TestObj* imp = V8TestObject::toNative(args.Holder());
4584 V8TRYCATCH_VOID(double, head, static_cast<double>(args[0]->NumberValue())); 4521 V8TRYCATCH_VOID(double, head, static_cast<double>(args[0]->NumberValue()));
4585 V8TRYCATCH_VOID(Vector<double>, tail, toNativeArguments<double>(args, 1)); 4522 V8TRYCATCH_VOID(Vector<double>, tail, toNativeArguments<double>(args, 1));
4586 imp->variadicDoubleMethod(head, tail); 4523 imp->variadicDoubleMethod(head, tail);
4587
4588 return; 4524 return;
4589 } 4525 }
4590 4526
4591 static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args) 4527 static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args)
4592 { 4528 {
4593 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4529 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4594 TestObjV8Internal::variadicDoubleMethodMethod(args); 4530 TestObjV8Internal::variadicDoubleMethodMethod(args);
4595 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4531 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4596 } 4532 }
4597 4533
4598 static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 4534 static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
4599 { 4535 {
4600 if (UNLIKELY(args.Length() < 1)) { 4536 if (UNLIKELY(args.Length() < 1)) {
4601 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.Get Isolate()); 4537 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.Get Isolate());
4602 return; 4538 return;
4603 } 4539 }
4604 TestObj* imp = V8TestObject::toNative(args.Holder()); 4540 TestObj* imp = V8TestObject::toNative(args.Holder());
4605 V8TRYCATCH_VOID(Node*, head, V8Node::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(a rgs[0])) : 0); 4541 V8TRYCATCH_VOID(Node*, head, V8Node::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(a rgs[0])) : 0);
4606 Vector<RefPtr<Node> > tail; 4542 Vector<RefPtr<Node> > tail;
4607 for (int i = 1; i < args.Length(); ++i) { 4543 for (int i = 1; i < args.Length(); ++i) {
4608 if (!V8Node::HasInstance(args[i], args.GetIsolate(), worldType(args.GetI solate()))) { 4544 if (!V8Node::HasInstance(args[i], args.GetIsolate(), worldType(args.GetI solate()))) {
4609 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMetho d", "TestObject", "parameter 2 is not of type 'Node'."), args.GetIsolate()); 4545 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMetho d", "TestObject", "parameter 2 is not of type 'Node'."), args.GetIsolate());
4610 return; 4546 return;
4611 } 4547 }
4612 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(args[i]))); 4548 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(args[i])));
4613 } 4549 }
4614 imp->variadicNodeMethod(head, tail); 4550 imp->variadicNodeMethod(head, tail);
4615
4616 return; 4551 return;
4617 } 4552 }
4618 4553
4619 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args) 4554 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args)
4620 { 4555 {
4621 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4556 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4622 TestObjV8Internal::variadicNodeMethodMethod(args); 4557 TestObjV8Internal::variadicNodeMethodMethod(args);
4623 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4558 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4624 } 4559 }
4625 4560
4626 static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8: :Value>& args) 4561 static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8: :Value>& args)
4627 { 4562 {
4628 if (UNLIKELY(args.Length() < 3)) { 4563 if (UNLIKELY(args.Length() < 3)) {
4629 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArg uments", "TestObject", ExceptionMessages::notEnoughArguments(3, args.Length())), args.GetIsolate()); 4564 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArg uments", "TestObject", ExceptionMessages::notEnoughArguments(3, args.Length())), args.GetIsolate());
4630 return; 4565 return;
4631 } 4566 }
4632 TestObj* imp = V8TestObject::toNative(args.Holder()); 4567 TestObj* imp = V8TestObject::toNative(args.Holder());
4633 bool strIsNull = args[0]->IsNull(); 4568 bool strIsNull = args[0]->IsNull();
4634 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strStringResource, args[0]); 4569 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strStringResource, args[0]);
4635 String str = strStringResource; 4570 String str = strStringResource;
4636 bool lIsNull = args[1]->IsNull(); 4571 bool lIsNull = args[1]->IsNull();
4637 V8TRYCATCH_VOID(int, l, toInt32(args[1])); 4572 V8TRYCATCH_VOID(int, l, toInt32(args[1]));
4638 V8TRYCATCH_VOID(TestObj*, obj, V8TestObject::HasInstance(args[2], args.GetIs olate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::O bject>::Cast(args[2])) : 0); 4573 V8TRYCATCH_VOID(TestObj*, obj, V8TestObject::HasInstance(args[2], args.GetIs olate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::O bject>::Cast(args[2])) : 0);
4639 if (UNLIKELY(args.Length() <= 3)) { 4574 if (UNLIKELY(args.Length() <= 3)) {
4640 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj); 4575 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj);
4641
4642 return; 4576 return;
4643 } 4577 }
4644 bool dIsNull = args[3]->IsNull(); 4578 bool dIsNull = args[3]->IsNull();
4645 V8TRYCATCH_VOID(double, d, static_cast<double>(args[3]->NumberValue())); 4579 V8TRYCATCH_VOID(double, d, static_cast<double>(args[3]->NumberValue()));
4646 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj , dIsNull ? 0 : &d); 4580 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj , dIsNull ? 0 : &d);
4647
4648 return; 4581 return;
4649 } 4582 }
4650 4583
4651 static void methodWithNullableArgumentsMethodCallback(const v8::FunctionCallback Info<v8::Value>& args) 4584 static void methodWithNullableArgumentsMethodCallback(const v8::FunctionCallback Info<v8::Value>& args)
4652 { 4585 {
4653 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4654 TestObjV8Internal::methodWithNullableArgumentsMethod(args); 4587 TestObjV8Internal::methodWithNullableArgumentsMethod(args);
4655 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4656 } 4589 }
4657 4590
4658 static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args ) 4591 static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args )
4659 { 4592 {
4660 TestObj* imp = V8TestObject::toNative(args.Holder()); 4593 TestObj* imp = V8TestObject::toNative(args.Holder());
4661 imp->perWorldMethod(); 4594 imp->perWorldMethod();
4662
4663 return; 4595 return;
4664 } 4596 }
4665 4597
4666 static void perWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8:: Value>& args) 4598 static void perWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8:: Value>& args)
4667 { 4599 {
4668 TestObj* imp = V8TestObject::toNative(args.Holder()); 4600 TestObj* imp = V8TestObject::toNative(args.Holder());
4669 imp->perWorldMethod(); 4601 imp->perWorldMethod();
4670
4671 return; 4602 return;
4672 } 4603 }
4673 4604
4674 static void perWorldMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args) 4605 static void perWorldMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args)
4675 { 4606 {
4676 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4607 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4677 TestObjV8Internal::perWorldMethodMethod(args); 4608 TestObjV8Internal::perWorldMethodMethod(args);
4678 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4609 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4679 } 4610 }
4680 4611
4681 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI nfo<v8::Value>& args) 4612 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI nfo<v8::Value>& args)
4682 { 4613 {
4683 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4614 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4684 TestObjV8Internal::perWorldMethodMethodForMainWorld(args); 4615 TestObjV8Internal::perWorldMethodMethodForMainWorld(args);
4685 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4616 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4686 } 4617 }
4687 4618
4688 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& args) 4619 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& args)
4689 { 4620 {
4690 if (UNLIKELY(args.Length() < 1)) { 4621 if (UNLIKELY(args.Length() < 1)) {
4691 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), ar gs.GetIsolate()); 4622 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), ar gs.GetIsolate());
4692 return; 4623 return;
4693 } 4624 }
4694 TestObj* imp = V8TestObject::toNative(args.Holder()); 4625 TestObj* imp = V8TestObject::toNative(args.Holder());
4695 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4626 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4696 imp->overloadedPerWorldMethod(longArg); 4627 imp->overloadedPerWorldMethod(longArg);
4697
4698 return; 4628 return;
4699 } 4629 }
4700 4630
4701 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& args) 4631 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& args)
4702 { 4632 {
4703 if (UNLIKELY(args.Length() < 1)) { 4633 if (UNLIKELY(args.Length() < 1)) {
4704 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), ar gs.GetIsolate()); 4634 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), ar gs.GetIsolate());
4705 return; 4635 return;
4706 } 4636 }
4707 TestObj* imp = V8TestObject::toNative(args.Holder()); 4637 TestObj* imp = V8TestObject::toNative(args.Holder());
4708 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4638 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4709 imp->overloadedPerWorldMethod(longArg); 4639 imp->overloadedPerWorldMethod(longArg);
4710
4711 return; 4640 return;
4712 } 4641 }
4713 4642
4714 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& args) 4643 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& args)
4715 { 4644 {
4716 if (UNLIKELY(args.Length() < 2)) { 4645 if (UNLIKELY(args.Length() < 2)) {
4717 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, args.Length())), ar gs.GetIsolate()); 4646 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, args.Length())), ar gs.GetIsolate());
4718 return; 4647 return;
4719 } 4648 }
4720 TestObj* imp = V8TestObject::toNative(args.Holder()); 4649 TestObj* imp = V8TestObject::toNative(args.Holder());
4721 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 4650 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
4722 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); 4651 V8TRYCATCH_VOID(int, longArg, toInt32(args[1]));
4723 imp->overloadedPerWorldMethod(strArg, longArg); 4652 imp->overloadedPerWorldMethod(strArg, longArg);
4724
4725 return; 4653 return;
4726 } 4654 }
4727 4655
4728 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& args) 4656 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& args)
4729 { 4657 {
4730 if (UNLIKELY(args.Length() < 2)) { 4658 if (UNLIKELY(args.Length() < 2)) {
4731 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, args.Length())), ar gs.GetIsolate()); 4659 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, args.Length())), ar gs.GetIsolate());
4732 return; 4660 return;
4733 } 4661 }
4734 TestObj* imp = V8TestObject::toNative(args.Holder()); 4662 TestObj* imp = V8TestObject::toNative(args.Holder());
4735 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 4663 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
4736 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); 4664 V8TRYCATCH_VOID(int, longArg, toInt32(args[1]));
4737 imp->overloadedPerWorldMethod(strArg, longArg); 4665 imp->overloadedPerWorldMethod(strArg, longArg);
4738
4739 return; 4666 return;
4740 } 4667 }
4741 4668
4742 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& args) 4669 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& args)
4743 { 4670 {
4744 if (args.Length() == 1) { 4671 if (args.Length() == 1) {
4745 overloadedPerWorldMethod1Method(args); 4672 overloadedPerWorldMethod1Method(args);
4746 return; 4673 return;
4747 } 4674 }
4748 if (args.Length() == 2) { 4675 if (args.Length() == 2) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
4789 4716
4790 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value >& args) 4717 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value >& args)
4791 { 4718 {
4792 if (UNLIKELY(args.Length() < 1)) { 4719 if (UNLIKELY(args.Length() < 1)) {
4793 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod1 ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate()); 4720 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod1 ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate());
4794 return; 4721 return;
4795 } 4722 }
4796 TestObj* imp = V8TestObject::toNative(args.Holder()); 4723 TestObj* imp = V8TestObject::toNative(args.Holder());
4797 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4724 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4798 imp->activityLoggedMethod1(longArg); 4725 imp->activityLoggedMethod1(longArg);
4799
4800 return; 4726 return;
4801 } 4727 }
4802 4728
4803 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args) 4729 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args)
4804 { 4730 {
4805 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4731 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4806 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge tCurrentContext()); 4732 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge tCurrentContext());
4807 if (contextData && contextData->activityLogger()) { 4733 if (contextData && contextData->activityLogger()) {
4808 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); 4734 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args);
4809 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", a rgs.Length(), loggerArgs.data(), "Method"); 4735 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", a rgs.Length(), loggerArgs.data(), "Method");
4810 } 4736 }
4811 TestObjV8Internal::activityLoggedMethod1Method(args); 4737 TestObjV8Internal::activityLoggedMethod1Method(args);
4812 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4738 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4813 } 4739 }
4814 4740
4815 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value >& args) 4741 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value >& args)
4816 { 4742 {
4817 if (UNLIKELY(args.Length() < 1)) { 4743 if (UNLIKELY(args.Length() < 1)) {
4818 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate()); 4744 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate());
4819 return; 4745 return;
4820 } 4746 }
4821 TestObj* imp = V8TestObject::toNative(args.Holder()); 4747 TestObj* imp = V8TestObject::toNative(args.Holder());
4822 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4748 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4823 imp->activityLoggedMethod2(longArg); 4749 imp->activityLoggedMethod2(longArg);
4824
4825 return; 4750 return;
4826 } 4751 }
4827 4752
4828 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn fo<v8::Value>& args) 4753 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn fo<v8::Value>& args)
4829 { 4754 {
4830 if (UNLIKELY(args.Length() < 1)) { 4755 if (UNLIKELY(args.Length() < 1)) {
4831 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate()); 4756 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate());
4832 return; 4757 return;
4833 } 4758 }
4834 TestObj* imp = V8TestObject::toNative(args.Holder()); 4759 TestObj* imp = V8TestObject::toNative(args.Holder());
4835 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4760 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4836 imp->activityLoggedMethod2(longArg); 4761 imp->activityLoggedMethod2(longArg);
4837
4838 return; 4762 return;
4839 } 4763 }
4840 4764
4841 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args) 4765 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args)
4842 { 4766 {
4843 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4767 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4844 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge tCurrentContext()); 4768 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge tCurrentContext());
4845 if (contextData && contextData->activityLogger()) { 4769 if (contextData && contextData->activityLogger()) {
4846 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); 4770 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args);
4847 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a rgs.Length(), loggerArgs.data(), "Method"); 4771 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a rgs.Length(), loggerArgs.data(), "Method");
(...skipping 16 matching lines...) Expand all
4864 4788
4865 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback Info<v8::Value>& args) 4789 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback Info<v8::Value>& args)
4866 { 4790 {
4867 if (UNLIKELY(args.Length() < 1)) { 4791 if (UNLIKELY(args.Length() < 1)) {
4868 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Len gth())), args.GetIsolate()); 4792 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Len gth())), args.GetIsolate());
4869 return; 4793 return;
4870 } 4794 }
4871 TestObj* imp = V8TestObject::toNative(args.Holder()); 4795 TestObj* imp = V8TestObject::toNative(args.Holder());
4872 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4796 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4873 imp->activityLoggedInIsolatedWorldMethod(longArg); 4797 imp->activityLoggedInIsolatedWorldMethod(longArg);
4874
4875 return; 4798 return;
4876 } 4799 }
4877 4800
4878 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func tionCallbackInfo<v8::Value>& args) 4801 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func tionCallbackInfo<v8::Value>& args)
4879 { 4802 {
4880 if (UNLIKELY(args.Length() < 1)) { 4803 if (UNLIKELY(args.Length() < 1)) {
4881 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Len gth())), args.GetIsolate()); 4804 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Len gth())), args.GetIsolate());
4882 return; 4805 return;
4883 } 4806 }
4884 TestObj* imp = V8TestObject::toNative(args.Holder()); 4807 TestObj* imp = V8TestObject::toNative(args.Holder());
4885 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4808 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4886 imp->activityLoggedInIsolatedWorldMethod(longArg); 4809 imp->activityLoggedInIsolatedWorldMethod(longArg);
4887
4888 return; 4810 return;
4889 } 4811 }
4890 4812
4891 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& args) 4813 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& args)
4892 { 4814 {
4893 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4894 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge tCurrentContext()); 4816 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge tCurrentContext());
4895 if (contextData && contextData->activityLogger()) { 4817 if (contextData && contextData->activityLogger()) {
4896 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); 4818 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args);
4897 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldMethod", args.Length(), loggerArgs.data(), "Method"); 4819 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldMethod", args.Length(), loggerArgs.data(), "Method");
(...skipping 11 matching lines...) Expand all
4909 4831
4910 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo <v8::Value>& args) 4832 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo <v8::Value>& args)
4911 { 4833 {
4912 if (UNLIKELY(args.Length() < 1)) { 4834 if (UNLIKELY(args.Length() < 1)) {
4913 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length() )), args.GetIsolate()); 4835 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length() )), args.GetIsolate());
4914 return; 4836 return;
4915 } 4837 }
4916 TestObj* imp = V8TestObject::toNative(args.Holder()); 4838 TestObj* imp = V8TestObject::toNative(args.Holder());
4917 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4839 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4918 imp->overloadedActivityLoggedMethod(longArg); 4840 imp->overloadedActivityLoggedMethod(longArg);
4919
4920 return; 4841 return;
4921 } 4842 }
4922 4843
4923 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& args) 4844 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& args)
4924 { 4845 {
4925 if (UNLIKELY(args.Length() < 1)) { 4846 if (UNLIKELY(args.Length() < 1)) {
4926 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length() )), args.GetIsolate()); 4847 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length() )), args.GetIsolate());
4927 return; 4848 return;
4928 } 4849 }
4929 TestObj* imp = V8TestObject::toNative(args.Holder()); 4850 TestObj* imp = V8TestObject::toNative(args.Holder());
4930 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 4851 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
4931 imp->overloadedActivityLoggedMethod(longArg); 4852 imp->overloadedActivityLoggedMethod(longArg);
4932
4933 return; 4853 return;
4934 } 4854 }
4935 4855
4936 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo <v8::Value>& args) 4856 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo <v8::Value>& args)
4937 { 4857 {
4938 if (UNLIKELY(args.Length() < 2)) { 4858 if (UNLIKELY(args.Length() < 2)) {
4939 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, args.Length() )), args.GetIsolate()); 4859 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, args.Length() )), args.GetIsolate());
4940 return; 4860 return;
4941 } 4861 }
4942 TestObj* imp = V8TestObject::toNative(args.Holder()); 4862 TestObj* imp = V8TestObject::toNative(args.Holder());
4943 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 4863 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
4944 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); 4864 V8TRYCATCH_VOID(int, longArg, toInt32(args[1]));
4945 imp->overloadedActivityLoggedMethod(strArg, longArg); 4865 imp->overloadedActivityLoggedMethod(strArg, longArg);
4946
4947 return; 4866 return;
4948 } 4867 }
4949 4868
4950 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& args) 4869 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& args)
4951 { 4870 {
4952 if (UNLIKELY(args.Length() < 2)) { 4871 if (UNLIKELY(args.Length() < 2)) {
4953 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, args.Length() )), args.GetIsolate()); 4872 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, args.Length() )), args.GetIsolate());
4954 return; 4873 return;
4955 } 4874 }
4956 TestObj* imp = V8TestObject::toNative(args.Holder()); 4875 TestObj* imp = V8TestObject::toNative(args.Holder());
4957 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 4876 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
4958 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); 4877 V8TRYCATCH_VOID(int, longArg, toInt32(args[1]));
4959 imp->overloadedActivityLoggedMethod(strArg, longArg); 4878 imp->overloadedActivityLoggedMethod(strArg, longArg);
4960
4961 return; 4879 return;
4962 } 4880 }
4963 4881
4964 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& args) 4882 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& args)
4965 { 4883 {
4966 if (args.Length() == 1) { 4884 if (args.Length() == 1) {
4967 overloadedActivityLoggedMethod1Method(args); 4885 overloadedActivityLoggedMethod1Method(args);
4968 return; 4886 return;
4969 } 4887 }
4970 if (args.Length() == 2) { 4888 if (args.Length() == 2) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
5016 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM ethod", args.Length(), loggerArgs.data(), "Method"); 4934 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM ethod", args.Length(), loggerArgs.data(), "Method");
5017 } 4935 }
5018 TestObjV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(args); 4936 TestObjV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(args);
5019 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4937 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
5020 } 4938 }
5021 4939
5022 static void deprecatedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& ar gs) 4940 static void deprecatedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& ar gs)
5023 { 4941 {
5024 TestObj* imp = V8TestObject::toNative(args.Holder()); 4942 TestObj* imp = V8TestObject::toNative(args.Holder());
5025 imp->deprecatedMethod(); 4943 imp->deprecatedMethod();
5026
5027 return; 4944 return;
5028 } 4945 }
5029 4946
5030 static void deprecatedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& args) 4947 static void deprecatedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& args)
5031 { 4948 {
5032 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4949 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5033 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Method); 4950 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Method);
5034 TestObjV8Internal::deprecatedMethodMethod(args); 4951 TestObjV8Internal::deprecatedMethodMethod(args);
5035 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4952 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
5036 } 4953 }
5037 4954
5038 static void deprecatedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& args) 4955 static void deprecatedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& args)
5039 { 4956 {
5040 TestObj::deprecatedStaticMethod(); 4957 TestObj::deprecatedStaticMethod();
5041
5042 return; 4958 return;
5043 } 4959 }
5044 4960
5045 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& args) 4961 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& args)
5046 { 4962 {
5047 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4963 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5048 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticMet hod); 4964 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticMet hod);
5049 TestObjV8Internal::deprecatedStaticMethodMethod(args); 4965 TestObjV8Internal::deprecatedStaticMethodMethod(args);
5050 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4966 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
5051 } 4967 }
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
5533 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInf o, wrapper, isolate, WrapperConfiguration::Independent); 5449 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInf o, wrapper, isolate, WrapperConfiguration::Independent);
5534 return wrapper; 5450 return wrapper;
5535 } 5451 }
5536 5452
5537 void V8TestObject::derefObject(void* object) 5453 void V8TestObject::derefObject(void* object)
5538 { 5454 {
5539 fromInternalPointer(object)->deref(); 5455 fromInternalPointer(object)->deref();
5540 } 5456 }
5541 5457
5542 } // namespace WebCore 5458 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestMediaQueryListListener.cpp ('k') | Source/bindings/tests/results/V8TestObjectPython.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698