| OLD | NEW |
| 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 2949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2960 | 2960 |
| 2961 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
args) | 2961 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 2962 { | 2962 { |
| 2963 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 2963 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 2964 TestObjV8Internal::voidMethodMethod(args); | 2964 TestObjV8Internal::voidMethodMethod(args); |
| 2965 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2965 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2966 } | 2966 } |
| 2967 | 2967 |
| 2968 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>&
args) | 2968 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 2969 { | 2969 { |
| 2970 if (args.Length() < 3) { | 2970 if (UNLIKELY(args.Length() < 3)) { |
| 2971 throwNotEnoughArgumentsError(args.GetIsolate()); | 2971 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 2972 return; | 2972 return; |
| 2973 } | 2973 } |
| 2974 TestObj* imp = V8TestObject::toNative(args.Holder()); | 2974 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 2975 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 2975 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 2976 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); | 2976 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); |
| 2977 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[2])) : 0); | 2977 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[2])) : 0); |
| 2978 imp->voidMethodWithArgs(longArg, strArg, objArg); | 2978 imp->voidMethodWithArgs(longArg, strArg, objArg); |
| 2979 | 2979 |
| 2980 return; | 2980 return; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2996 | 2996 |
| 2997 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
args) | 2997 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 2998 { | 2998 { |
| 2999 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 2999 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3000 TestObjV8Internal::longMethodMethod(args); | 3000 TestObjV8Internal::longMethodMethod(args); |
| 3001 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3001 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3002 } | 3002 } |
| 3003 | 3003 |
| 3004 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>&
args) | 3004 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 3005 { | 3005 { |
| 3006 if (args.Length() < 3) { | 3006 if (UNLIKELY(args.Length() < 3)) { |
| 3007 throwNotEnoughArgumentsError(args.GetIsolate()); | 3007 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3008 return; | 3008 return; |
| 3009 } | 3009 } |
| 3010 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3010 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3011 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 3011 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 3012 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); | 3012 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); |
| 3013 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[2])) : 0); | 3013 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[2])) : 0); |
| 3014 v8SetReturnValueInt(args, imp->longMethodWithArgs(longArg, strArg, objArg)); | 3014 v8SetReturnValueInt(args, imp->longMethodWithArgs(longArg, strArg, objArg)); |
| 3015 return; | 3015 return; |
| 3016 } | 3016 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3032 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 3032 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 3033 { | 3033 { |
| 3034 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3034 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3035 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); | 3035 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); |
| 3036 TestObjV8Internal::objMethodMethod(args); | 3036 TestObjV8Internal::objMethodMethod(args); |
| 3037 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3037 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3038 } | 3038 } |
| 3039 | 3039 |
| 3040 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 3040 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 3041 { | 3041 { |
| 3042 if (args.Length() < 3) { | 3042 if (UNLIKELY(args.Length() < 3)) { |
| 3043 throwNotEnoughArgumentsError(args.GetIsolate()); | 3043 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3044 return; | 3044 return; |
| 3045 } | 3045 } |
| 3046 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3046 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3047 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 3047 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 3048 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); | 3048 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); |
| 3049 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[2])) : 0); | 3049 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[2])) : 0); |
| 3050 v8SetReturnValue(args, imp->objMethodWithArgs(longArg, strArg, objArg), args
.Holder()); | 3050 v8SetReturnValue(args, imp->objMethodWithArgs(longArg, strArg, objArg), args
.Holder()); |
| 3051 return; | 3051 return; |
| 3052 } | 3052 } |
| 3053 | 3053 |
| 3054 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& args) | 3054 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& args) |
| 3055 { | 3055 { |
| 3056 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3056 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3057 TestObjV8Internal::objMethodWithArgsMethod(args); | 3057 TestObjV8Internal::objMethodWithArgsMethod(args); |
| 3058 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3058 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3059 } | 3059 } |
| 3060 | 3060 |
| 3061 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& args) | 3061 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& args) |
| 3062 { | 3062 { |
| 3063 if (args.Length() < 1) { | 3063 if (UNLIKELY(args.Length() < 1)) { |
| 3064 throwNotEnoughArgumentsError(args.GetIsolate()); | 3064 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3065 return; | 3065 return; |
| 3066 } | 3066 } |
| 3067 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3067 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3068 V8TRYCATCH_VOID(Vector<RefPtr<TestInterface> >, sequenceArg, (toRefPtrNative
Array<TestInterface, V8TestInterface>(args[0], args.GetIsolate()))); | 3068 V8TRYCATCH_VOID(Vector<RefPtr<TestInterface> >, sequenceArg, (toRefPtrNative
Array<TestInterface, V8TestInterface>(args[0], args.GetIsolate()))); |
| 3069 imp->methodWithSequenceArg(sequenceArg); | 3069 imp->methodWithSequenceArg(sequenceArg); |
| 3070 | 3070 |
| 3071 return; | 3071 return; |
| 3072 } | 3072 } |
| 3073 | 3073 |
| 3074 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& args) | 3074 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& args) |
| 3075 { | 3075 { |
| 3076 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3076 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3077 TestObjV8Internal::methodWithSequenceArgMethod(args); | 3077 TestObjV8Internal::methodWithSequenceArgMethod(args); |
| 3078 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3078 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3079 } | 3079 } |
| 3080 | 3080 |
| 3081 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& args) | 3081 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& args) |
| 3082 { | 3082 { |
| 3083 if (args.Length() < 1) { | 3083 if (UNLIKELY(args.Length() < 1)) { |
| 3084 throwNotEnoughArgumentsError(args.GetIsolate()); | 3084 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3085 return; | 3085 return; |
| 3086 } | 3086 } |
| 3087 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3087 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3088 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 3088 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 3089 v8SetReturnValue(args, v8Array(imp->methodReturningSequence(longArg), args.G
etIsolate())); | 3089 v8SetReturnValue(args, v8Array(imp->methodReturningSequence(longArg), args.G
etIsolate())); |
| 3090 return; | 3090 return; |
| 3091 } | 3091 } |
| 3092 | 3092 |
| 3093 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& args) | 3093 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& args) |
| 3094 { | 3094 { |
| 3095 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3095 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3096 TestObjV8Internal::methodReturningSequenceMethod(args); | 3096 TestObjV8Internal::methodReturningSequenceMethod(args); |
| 3097 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3097 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3098 } | 3098 } |
| 3099 | 3099 |
| 3100 static void methodWithEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 3100 static void methodWithEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 3101 { | 3101 { |
| 3102 if (args.Length() < 1) { | 3102 if (UNLIKELY(args.Length() < 1)) { |
| 3103 throwNotEnoughArgumentsError(args.GetIsolate()); | 3103 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3104 return; | 3104 return; |
| 3105 } | 3105 } |
| 3106 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3106 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3107 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, enumArg, args[0]); | 3107 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, enumArg, args[0]); |
| 3108 String string = enumArg; | 3108 String string = enumArg; |
| 3109 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { | 3109 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { |
| 3110 throwTypeError(args.GetIsolate()); | 3110 throwTypeError(args.GetIsolate()); |
| 3111 return; | 3111 return; |
| 3112 } | 3112 } |
| 3113 imp->methodWithEnumArg(enumArg); | 3113 imp->methodWithEnumArg(enumArg); |
| 3114 | 3114 |
| 3115 return; | 3115 return; |
| 3116 } | 3116 } |
| 3117 | 3117 |
| 3118 static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& args) | 3118 static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& args) |
| 3119 { | 3119 { |
| 3120 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3120 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3121 TestObjV8Internal::methodWithEnumArgMethod(args); | 3121 TestObjV8Internal::methodWithEnumArgMethod(args); |
| 3122 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3122 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3123 } | 3123 } |
| 3124 | 3124 |
| 3125 static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackI
nfo<v8::Value>& args) | 3125 static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackI
nfo<v8::Value>& args) |
| 3126 { | 3126 { |
| 3127 if (args.Length() < 2) { | 3127 if (UNLIKELY(args.Length() < 2)) { |
| 3128 throwNotEnoughArgumentsError(args.GetIsolate()); | 3128 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3129 return; | 3129 return; |
| 3130 } | 3130 } |
| 3131 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3131 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3132 ExceptionState es(args.GetIsolate()); | 3132 ExceptionState es(args.GetIsolate()); |
| 3133 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); | 3133 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); |
| 3134 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[1])) : 0); | 3134 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[1])) : 0); |
| 3135 RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, obj
Arg, es); | 3135 RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, obj
Arg, es); |
| 3136 if (es.throwIfNeeded()) | 3136 if (es.throwIfNeeded()) |
| 3137 return; | 3137 return; |
| 3138 v8SetReturnValue(args, result.release(), args.Holder()); | 3138 v8SetReturnValue(args, result.release(), args.Holder()); |
| 3139 return; | 3139 return; |
| 3140 } | 3140 } |
| 3141 | 3141 |
| 3142 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& args) | 3142 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& args) |
| 3143 { | 3143 { |
| 3144 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3144 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3145 TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(args); | 3145 TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(args); |
| 3146 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3146 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3147 } | 3147 } |
| 3148 | 3148 |
| 3149 static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& arg
s) | 3149 static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& arg
s) |
| 3150 { | 3150 { |
| 3151 if (args.Length() < 1) { | 3151 if (UNLIKELY(args.Length() < 1)) { |
| 3152 throwNotEnoughArgumentsError(args.GetIsolate()); | 3152 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3153 return; | 3153 return; |
| 3154 } | 3154 } |
| 3155 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3155 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3156 bool serializedArgDidThrow = false; | 3156 bool serializedArgDidThrow = false; |
| 3157 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(
args[0], 0, 0, serializedArgDidThrow, args.GetIsolate()); | 3157 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(
args[0], 0, 0, serializedArgDidThrow, args.GetIsolate()); |
| 3158 if (serializedArgDidThrow) | 3158 if (serializedArgDidThrow) |
| 3159 return; | 3159 return; |
| 3160 imp->serializedValue(serializedArg); | 3160 imp->serializedValue(serializedArg); |
| 3161 | 3161 |
| 3162 return; | 3162 return; |
| 3163 } | 3163 } |
| 3164 | 3164 |
| 3165 static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& args) | 3165 static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& args) |
| 3166 { | 3166 { |
| 3167 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3167 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3168 TestObjV8Internal::serializedValueMethod(args); | 3168 TestObjV8Internal::serializedValueMethod(args); |
| 3169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3170 } | 3170 } |
| 3171 | 3171 |
| 3172 static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& args) | 3172 static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 3173 { | 3173 { |
| 3174 if (args.Length() < 1) { | 3174 if (UNLIKELY(args.Length() < 1)) { |
| 3175 throwNotEnoughArgumentsError(args.GetIsolate()); | 3175 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3176 return; | 3176 return; |
| 3177 } | 3177 } |
| 3178 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3178 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3179 V8TRYCATCH_VOID(Dictionary, oo, Dictionary(args[0], args.GetIsolate())); | 3179 V8TRYCATCH_VOID(Dictionary, oo, Dictionary(args[0], args.GetIsolate())); |
| 3180 if (!oo.isUndefinedOrNull() && !oo.isObject()) { | 3180 if (!oo.isUndefinedOrNull() && !oo.isObject()) { |
| 3181 throwTypeError("Not an object.", args.GetIsolate()); | 3181 throwTypeError("Not an object.", args.GetIsolate()); |
| 3182 return; | 3182 return; |
| 3183 } | 3183 } |
| 3184 V8TRYCATCH_VOID(Dictionary, ooo, Dictionary(args[1], args.GetIsolate())); | 3184 V8TRYCATCH_VOID(Dictionary, ooo, Dictionary(args[1], args.GetIsolate())); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3499 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& args) | 3499 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& args) |
| 3500 { | 3500 { |
| 3501 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3501 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3502 TestObjV8Internal::withActiveWindowAndFirstWindowMethod(args); | 3502 TestObjV8Internal::withActiveWindowAndFirstWindowMethod(args); |
| 3503 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3503 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3504 } | 3504 } |
| 3505 | 3505 |
| 3506 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& args) | 3506 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& args) |
| 3507 { | 3507 { |
| 3508 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3508 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3509 if (args.Length() <= 0) { | 3509 if (UNLIKELY(args.Length() <= 0)) { |
| 3510 imp->methodWithOptionalArg(); | 3510 imp->methodWithOptionalArg(); |
| 3511 | 3511 |
| 3512 return; | 3512 return; |
| 3513 } | 3513 } |
| 3514 V8TRYCATCH_VOID(int, opt, toInt32(args[0])); | 3514 V8TRYCATCH_VOID(int, opt, toInt32(args[0])); |
| 3515 imp->methodWithOptionalArg(opt); | 3515 imp->methodWithOptionalArg(opt); |
| 3516 | 3516 |
| 3517 return; | 3517 return; |
| 3518 } | 3518 } |
| 3519 | 3519 |
| 3520 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& args) | 3520 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& args) |
| 3521 { | 3521 { |
| 3522 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3522 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3523 TestObjV8Internal::methodWithOptionalArgMethod(args); | 3523 TestObjV8Internal::methodWithOptionalArgMethod(args); |
| 3524 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3524 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3525 } | 3525 } |
| 3526 | 3526 |
| 3527 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& args) | 3527 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& args) |
| 3528 { | 3528 { |
| 3529 if (args.Length() < 1) { | 3529 if (UNLIKELY(args.Length() < 1)) { |
| 3530 throwNotEnoughArgumentsError(args.GetIsolate()); | 3530 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3531 return; | 3531 return; |
| 3532 } | 3532 } |
| 3533 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3533 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3534 V8TRYCATCH_VOID(int, nonOpt, toInt32(args[0])); | 3534 V8TRYCATCH_VOID(int, nonOpt, toInt32(args[0])); |
| 3535 if (args.Length() <= 1) { | 3535 if (UNLIKELY(args.Length() <= 1)) { |
| 3536 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); | 3536 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); |
| 3537 | 3537 |
| 3538 return; | 3538 return; |
| 3539 } | 3539 } |
| 3540 V8TRYCATCH_VOID(int, opt, toInt32(args[1])); | 3540 V8TRYCATCH_VOID(int, opt, toInt32(args[1])); |
| 3541 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); | 3541 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); |
| 3542 | 3542 |
| 3543 return; | 3543 return; |
| 3544 } | 3544 } |
| 3545 | 3545 |
| 3546 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& args) | 3546 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& args) |
| 3547 { | 3547 { |
| 3548 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3548 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3549 TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(args); | 3549 TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(args); |
| 3550 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3550 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3551 } | 3551 } |
| 3552 | 3552 |
| 3553 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC
allbackInfo<v8::Value>& args) | 3553 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC
allbackInfo<v8::Value>& args) |
| 3554 { | 3554 { |
| 3555 if (args.Length() < 1) { | 3555 if (UNLIKELY(args.Length() < 1)) { |
| 3556 throwNotEnoughArgumentsError(args.GetIsolate()); | 3556 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3557 return; | 3557 return; |
| 3558 } | 3558 } |
| 3559 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3559 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3560 V8TRYCATCH_VOID(int, nonOpt, toInt32(args[0])); | 3560 V8TRYCATCH_VOID(int, nonOpt, toInt32(args[0])); |
| 3561 if (args.Length() <= 1) { | 3561 if (UNLIKELY(args.Length() <= 1)) { |
| 3562 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); | 3562 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); |
| 3563 | 3563 |
| 3564 return; | 3564 return; |
| 3565 } | 3565 } |
| 3566 V8TRYCATCH_VOID(int, opt1, toInt32(args[1])); | 3566 V8TRYCATCH_VOID(int, opt1, toInt32(args[1])); |
| 3567 if (args.Length() <= 2) { | 3567 if (UNLIKELY(args.Length() <= 2)) { |
| 3568 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); | 3568 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); |
| 3569 | 3569 |
| 3570 return; | 3570 return; |
| 3571 } | 3571 } |
| 3572 V8TRYCATCH_VOID(int, opt2, toInt32(args[2])); | 3572 V8TRYCATCH_VOID(int, opt2, toInt32(args[2])); |
| 3573 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); | 3573 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); |
| 3574 | 3574 |
| 3575 return; | 3575 return; |
| 3576 } | 3576 } |
| 3577 | 3577 |
| 3578 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& args) | 3578 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& args) |
| 3579 { | 3579 { |
| 3580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3581 TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(args); | 3581 TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(args); |
| 3582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3583 } | 3583 } |
| 3584 | 3584 |
| 3585 static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& args) | 3585 static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& args) |
| 3586 { | 3586 { |
| 3587 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3587 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3588 if (args.Length() <= 0) { | 3588 if (UNLIKELY(args.Length() <= 0)) { |
| 3589 imp->methodWithOptionalString(); | 3589 imp->methodWithOptionalString(); |
| 3590 | 3590 |
| 3591 return; | 3591 return; |
| 3592 } | 3592 } |
| 3593 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]); | 3593 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]); |
| 3594 imp->methodWithOptionalString(str); | 3594 imp->methodWithOptionalString(str); |
| 3595 | 3595 |
| 3596 return; | 3596 return; |
| 3597 } | 3597 } |
| 3598 | 3598 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3630 | 3630 |
| 3631 static void methodWithOptionalStringIsNullStringMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& args) | 3631 static void methodWithOptionalStringIsNullStringMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& args) |
| 3632 { | 3632 { |
| 3633 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3633 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3634 TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(args); | 3634 TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(args); |
| 3635 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3635 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3636 } | 3636 } |
| 3637 | 3637 |
| 3638 static void methodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& args) | 3638 static void methodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& args) |
| 3639 { | 3639 { |
| 3640 if (args.Length() < 1) { | 3640 if (UNLIKELY(args.Length() < 1)) { |
| 3641 throwNotEnoughArgumentsError(args.GetIsolate()); | 3641 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3642 return; | 3642 return; |
| 3643 } | 3643 } |
| 3644 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3644 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3645 if (args.Length() <= 0 || !args[0]->IsFunction()) { | 3645 if (args.Length() <= 0 || !args[0]->IsFunction()) { |
| 3646 throwTypeError(args.GetIsolate()); | 3646 throwTypeError(args.GetIsolate()); |
| 3647 return; | 3647 return; |
| 3648 } | 3648 } |
| 3649 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); | 3649 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); |
| 3650 imp->methodWithCallbackArg(callback); | 3650 imp->methodWithCallbackArg(callback); |
| 3651 | 3651 |
| 3652 return; | 3652 return; |
| 3653 } | 3653 } |
| 3654 | 3654 |
| 3655 static void methodWithCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& args) | 3655 static void methodWithCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& args) |
| 3656 { | 3656 { |
| 3657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3658 TestObjV8Internal::methodWithCallbackArgMethod(args); | 3658 TestObjV8Internal::methodWithCallbackArgMethod(args); |
| 3659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3660 } | 3660 } |
| 3661 | 3661 |
| 3662 static void methodWithNonCallbackArgAndCallbackArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& args) | 3662 static void methodWithNonCallbackArgAndCallbackArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& args) |
| 3663 { | 3663 { |
| 3664 if (args.Length() < 2) { | 3664 if (UNLIKELY(args.Length() < 2)) { |
| 3665 throwNotEnoughArgumentsError(args.GetIsolate()); | 3665 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3666 return; | 3666 return; |
| 3667 } | 3667 } |
| 3668 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3668 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3669 V8TRYCATCH_VOID(int, nonCallback, toInt32(args[0])); | 3669 V8TRYCATCH_VOID(int, nonCallback, toInt32(args[0])); |
| 3670 if (args.Length() <= 1 || !args[1]->IsFunction()) { | 3670 if (args.Length() <= 1 || !args[1]->IsFunction()) { |
| 3671 throwTypeError(args.GetIsolate()); | 3671 throwTypeError(args.GetIsolate()); |
| 3672 return; | 3672 return; |
| 3673 } | 3673 } |
| 3674 RefPtr<TestCallback> callback = V8TestCallback::create(args[1], getScriptExe
cutionContext()); | 3674 RefPtr<TestCallback> callback = V8TestCallback::create(args[1], getScriptExe
cutionContext()); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 3702 | 3702 |
| 3703 static void methodWithCallbackAndOptionalArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& args) | 3703 static void methodWithCallbackAndOptionalArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& args) |
| 3704 { | 3704 { |
| 3705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3706 TestObjV8Internal::methodWithCallbackAndOptionalArgMethod(args); | 3706 TestObjV8Internal::methodWithCallbackAndOptionalArgMethod(args); |
| 3707 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3707 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3708 } | 3708 } |
| 3709 | 3709 |
| 3710 static void methodWithNullableCallbackArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& args) | 3710 static void methodWithNullableCallbackArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& args) |
| 3711 { | 3711 { |
| 3712 if (args.Length() < 1) { | 3712 if (UNLIKELY(args.Length() < 1)) { |
| 3713 throwNotEnoughArgumentsError(args.GetIsolate()); | 3713 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3714 return; | 3714 return; |
| 3715 } | 3715 } |
| 3716 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3716 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3717 if (args.Length() <= 0 || !(args[0]->IsFunction() || args[0]->IsNull())) { | 3717 if (args.Length() <= 0 || !(args[0]->IsFunction() || args[0]->IsNull())) { |
| 3718 throwTypeError(args.GetIsolate()); | 3718 throwTypeError(args.GetIsolate()); |
| 3719 return; | 3719 return; |
| 3720 } | 3720 } |
| 3721 RefPtr<TestCallback> callback = args[0]->IsNull() ? 0 : V8TestCallback::crea
te(args[0], getScriptExecutionContext()); | 3721 RefPtr<TestCallback> callback = args[0]->IsNull() ? 0 : V8TestCallback::crea
te(args[0], getScriptExecutionContext()); |
| 3722 imp->methodWithNullableCallbackArg(callback); | 3722 imp->methodWithNullableCallbackArg(callback); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3748 | 3748 |
| 3749 static void staticMethodWithCallbackAndOptionalArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& args) | 3749 static void staticMethodWithCallbackAndOptionalArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& args) |
| 3750 { | 3750 { |
| 3751 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3751 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3752 TestObjV8Internal::staticMethodWithCallbackAndOptionalArgMethod(args); | 3752 TestObjV8Internal::staticMethodWithCallbackAndOptionalArgMethod(args); |
| 3753 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3753 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3754 } | 3754 } |
| 3755 | 3755 |
| 3756 static void staticMethodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& args) | 3756 static void staticMethodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& args) |
| 3757 { | 3757 { |
| 3758 if (args.Length() < 1) { | 3758 if (UNLIKELY(args.Length() < 1)) { |
| 3759 throwNotEnoughArgumentsError(args.GetIsolate()); | 3759 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3760 return; | 3760 return; |
| 3761 } | 3761 } |
| 3762 if (args.Length() <= 0 || !args[0]->IsFunction()) { | 3762 if (args.Length() <= 0 || !args[0]->IsFunction()) { |
| 3763 throwTypeError(args.GetIsolate()); | 3763 throwTypeError(args.GetIsolate()); |
| 3764 return; | 3764 return; |
| 3765 } | 3765 } |
| 3766 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); | 3766 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); |
| 3767 TestObj::staticMethodWithCallbackArg(callback); | 3767 TestObj::staticMethodWithCallbackArg(callback); |
| 3768 | 3768 |
| 3769 return; | 3769 return; |
| 3770 } | 3770 } |
| 3771 | 3771 |
| 3772 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) | 3772 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) |
| 3773 { | 3773 { |
| 3774 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3774 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3775 TestObjV8Internal::staticMethodWithCallbackArgMethod(args); | 3775 TestObjV8Internal::staticMethodWithCallbackArgMethod(args); |
| 3776 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3776 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3777 } | 3777 } |
| 3778 | 3778 |
| 3779 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8::
Value>& args) | 3779 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8::
Value>& args) |
| 3780 { | 3780 { |
| 3781 if (args.Length() < 1) { | 3781 if (UNLIKELY(args.Length() < 1)) { |
| 3782 throwNotEnoughArgumentsError(args.GetIsolate()); | 3782 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3783 return; | 3783 return; |
| 3784 } | 3784 } |
| 3785 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3785 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3786 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt8(args[0], EnforceRange, ok)
, args.GetIsolate()); | 3786 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt8(args[0], EnforceRange, ok)
, args.GetIsolate()); |
| 3787 imp->methodWithEnforceRangeInt8(value); | 3787 imp->methodWithEnforceRangeInt8(value); |
| 3788 | 3788 |
| 3789 return; | 3789 return; |
| 3790 } | 3790 } |
| 3791 | 3791 |
| 3792 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& args) | 3792 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& args) |
| 3793 { | 3793 { |
| 3794 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3794 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3795 TestObjV8Internal::methodWithEnforceRangeInt8Method(args); | 3795 TestObjV8Internal::methodWithEnforceRangeInt8Method(args); |
| 3796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3797 } | 3797 } |
| 3798 | 3798 |
| 3799 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8:
:Value>& args) | 3799 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8:
:Value>& args) |
| 3800 { | 3800 { |
| 3801 if (args.Length() < 1) { | 3801 if (UNLIKELY(args.Length() < 1)) { |
| 3802 throwNotEnoughArgumentsError(args.GetIsolate()); | 3802 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3803 return; | 3803 return; |
| 3804 } | 3804 } |
| 3805 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3805 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3806 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt8(args[0], EnforceRang
e, ok), args.GetIsolate()); | 3806 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt8(args[0], EnforceRang
e, ok), args.GetIsolate()); |
| 3807 imp->methodWithEnforceRangeUInt8(value); | 3807 imp->methodWithEnforceRangeUInt8(value); |
| 3808 | 3808 |
| 3809 return; | 3809 return; |
| 3810 } | 3810 } |
| 3811 | 3811 |
| 3812 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) | 3812 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) |
| 3813 { | 3813 { |
| 3814 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3814 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3815 TestObjV8Internal::methodWithEnforceRangeUInt8Method(args); | 3815 TestObjV8Internal::methodWithEnforceRangeUInt8Method(args); |
| 3816 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3816 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3817 } | 3817 } |
| 3818 | 3818 |
| 3819 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8:
:Value>& args) | 3819 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8:
:Value>& args) |
| 3820 { | 3820 { |
| 3821 if (args.Length() < 1) { | 3821 if (UNLIKELY(args.Length() < 1)) { |
| 3822 throwNotEnoughArgumentsError(args.GetIsolate()); | 3822 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3823 return; | 3823 return; |
| 3824 } | 3824 } |
| 3825 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3825 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3826 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt32(args[0], EnforceRange, ok
), args.GetIsolate()); | 3826 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt32(args[0], EnforceRange, ok
), args.GetIsolate()); |
| 3827 imp->methodWithEnforceRangeInt32(value); | 3827 imp->methodWithEnforceRangeInt32(value); |
| 3828 | 3828 |
| 3829 return; | 3829 return; |
| 3830 } | 3830 } |
| 3831 | 3831 |
| 3832 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) | 3832 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) |
| 3833 { | 3833 { |
| 3834 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3834 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3835 TestObjV8Internal::methodWithEnforceRangeInt32Method(args); | 3835 TestObjV8Internal::methodWithEnforceRangeInt32Method(args); |
| 3836 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3836 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3837 } | 3837 } |
| 3838 | 3838 |
| 3839 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8
::Value>& args) | 3839 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8
::Value>& args) |
| 3840 { | 3840 { |
| 3841 if (args.Length() < 1) { | 3841 if (UNLIKELY(args.Length() < 1)) { |
| 3842 throwNotEnoughArgumentsError(args.GetIsolate()); | 3842 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3843 return; | 3843 return; |
| 3844 } | 3844 } |
| 3845 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3845 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3846 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt32(args[0], EnforceRan
ge, ok), args.GetIsolate()); | 3846 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt32(args[0], EnforceRan
ge, ok), args.GetIsolate()); |
| 3847 imp->methodWithEnforceRangeUInt32(value); | 3847 imp->methodWithEnforceRangeUInt32(value); |
| 3848 | 3848 |
| 3849 return; | 3849 return; |
| 3850 } | 3850 } |
| 3851 | 3851 |
| 3852 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& args) | 3852 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& args) |
| 3853 { | 3853 { |
| 3854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3855 TestObjV8Internal::methodWithEnforceRangeUInt32Method(args); | 3855 TestObjV8Internal::methodWithEnforceRangeUInt32Method(args); |
| 3856 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3856 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3857 } | 3857 } |
| 3858 | 3858 |
| 3859 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8:
:Value>& args) | 3859 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8:
:Value>& args) |
| 3860 { | 3860 { |
| 3861 if (args.Length() < 1) { | 3861 if (UNLIKELY(args.Length() < 1)) { |
| 3862 throwNotEnoughArgumentsError(args.GetIsolate()); | 3862 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3863 return; | 3863 return; |
| 3864 } | 3864 } |
| 3865 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3865 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3866 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, value, toInt64(args[0], EnforceRan
ge, ok), args.GetIsolate()); | 3866 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, value, toInt64(args[0], EnforceRan
ge, ok), args.GetIsolate()); |
| 3867 imp->methodWithEnforceRangeInt64(value); | 3867 imp->methodWithEnforceRangeInt64(value); |
| 3868 | 3868 |
| 3869 return; | 3869 return; |
| 3870 } | 3870 } |
| 3871 | 3871 |
| 3872 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) | 3872 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) |
| 3873 { | 3873 { |
| 3874 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3874 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3875 TestObjV8Internal::methodWithEnforceRangeInt64Method(args); | 3875 TestObjV8Internal::methodWithEnforceRangeInt64Method(args); |
| 3876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3877 } | 3877 } |
| 3878 | 3878 |
| 3879 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8
::Value>& args) | 3879 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8
::Value>& args) |
| 3880 { | 3880 { |
| 3881 if (args.Length() < 1) { | 3881 if (UNLIKELY(args.Length() < 1)) { |
| 3882 throwNotEnoughArgumentsError(args.GetIsolate()); | 3882 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3883 return; | 3883 return; |
| 3884 } | 3884 } |
| 3885 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3885 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3886 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, value, toUInt64(args[0],
EnforceRange, ok), args.GetIsolate()); | 3886 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, value, toUInt64(args[0],
EnforceRange, ok), args.GetIsolate()); |
| 3887 imp->methodWithEnforceRangeUInt64(value); | 3887 imp->methodWithEnforceRangeUInt64(value); |
| 3888 | 3888 |
| 3889 return; | 3889 return; |
| 3890 } | 3890 } |
| 3891 | 3891 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3973 | 3973 |
| 3974 static void callbackFunctionReturnValueMethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) | 3974 static void callbackFunctionReturnValueMethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) |
| 3975 { | 3975 { |
| 3976 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3976 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3977 TestObjV8Internal::callbackFunctionReturnValueMethod(args); | 3977 TestObjV8Internal::callbackFunctionReturnValueMethod(args); |
| 3978 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3978 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3979 } | 3979 } |
| 3980 | 3980 |
| 3981 static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& args) | 3981 static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& args) |
| 3982 { | 3982 { |
| 3983 if (args.Length() < 1) { | 3983 if (UNLIKELY(args.Length() < 1)) { |
| 3984 throwNotEnoughArgumentsError(args.GetIsolate()); | 3984 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 3985 return; | 3985 return; |
| 3986 } | 3986 } |
| 3987 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3987 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3988 V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(args[0])); | 3988 V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(args[0])); |
| 3989 imp->callbackFunctionArgument(function); | 3989 imp->callbackFunctionArgument(function); |
| 3990 | 3990 |
| 3991 return; | 3991 return; |
| 3992 } | 3992 } |
| 3993 | 3993 |
| 3994 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& args) | 3994 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& args) |
| 3995 { | 3995 { |
| 3996 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3996 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3997 TestObjV8Internal::callbackFunctionArgumentMethod(args); | 3997 TestObjV8Internal::callbackFunctionArgumentMethod(args); |
| 3998 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3998 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3999 } | 3999 } |
| 4000 | 4000 |
| 4001 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 4001 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 4002 { | 4002 { |
| 4003 if (args.Length() < 2) { | 4003 if (UNLIKELY(args.Length() < 2)) { |
| 4004 throwNotEnoughArgumentsError(args.GetIsolate()); | 4004 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4005 return; | 4005 return; |
| 4006 } | 4006 } |
| 4007 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4007 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4008 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[0])) : 0); | 4008 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[0])) : 0); |
| 4009 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); | 4009 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); |
| 4010 imp->overloadedMethod(objArg, strArg); | 4010 imp->overloadedMethod(objArg, strArg); |
| 4011 | 4011 |
| 4012 return; | 4012 return; |
| 4013 } | 4013 } |
| 4014 | 4014 |
| 4015 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 4015 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 4016 { | 4016 { |
| 4017 if (args.Length() < 1) { | 4017 if (UNLIKELY(args.Length() < 1)) { |
| 4018 throwNotEnoughArgumentsError(args.GetIsolate()); | 4018 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4019 return; | 4019 return; |
| 4020 } | 4020 } |
| 4021 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4021 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4022 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[0])) : 0); | 4022 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[0])) : 0); |
| 4023 if (args.Length() <= 1) { | 4023 if (UNLIKELY(args.Length() <= 1)) { |
| 4024 imp->overloadedMethod(objArg); | 4024 imp->overloadedMethod(objArg); |
| 4025 | 4025 |
| 4026 return; | 4026 return; |
| 4027 } | 4027 } |
| 4028 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); | 4028 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); |
| 4029 imp->overloadedMethod(objArg, longArg); | 4029 imp->overloadedMethod(objArg, longArg); |
| 4030 | 4030 |
| 4031 return; | 4031 return; |
| 4032 } | 4032 } |
| 4033 | 4033 |
| 4034 static void overloadedMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 4034 static void overloadedMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 4035 { | 4035 { |
| 4036 if (args.Length() < 1) { | 4036 if (UNLIKELY(args.Length() < 1)) { |
| 4037 throwNotEnoughArgumentsError(args.GetIsolate()); | 4037 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4038 return; | 4038 return; |
| 4039 } | 4039 } |
| 4040 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4040 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4041 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); | 4041 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); |
| 4042 imp->overloadedMethod(strArg); | 4042 imp->overloadedMethod(strArg); |
| 4043 | 4043 |
| 4044 return; | 4044 return; |
| 4045 } | 4045 } |
| 4046 | 4046 |
| 4047 static void overloadedMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 4047 static void overloadedMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 4048 { | 4048 { |
| 4049 if (args.Length() < 1) { | 4049 if (UNLIKELY(args.Length() < 1)) { |
| 4050 throwNotEnoughArgumentsError(args.GetIsolate()); | 4050 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4051 return; | 4051 return; |
| 4052 } | 4052 } |
| 4053 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4053 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4054 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4054 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4055 imp->overloadedMethod(longArg); | 4055 imp->overloadedMethod(longArg); |
| 4056 | 4056 |
| 4057 return; | 4057 return; |
| 4058 } | 4058 } |
| 4059 | 4059 |
| 4060 static void overloadedMethod5Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 4060 static void overloadedMethod5Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 4061 { | 4061 { |
| 4062 if (args.Length() < 1) { | 4062 if (UNLIKELY(args.Length() < 1)) { |
| 4063 throwNotEnoughArgumentsError(args.GetIsolate()); | 4063 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4064 return; | 4064 return; |
| 4065 } | 4065 } |
| 4066 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4066 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4067 if (args.Length() <= 0 || !args[0]->IsFunction()) { | 4067 if (args.Length() <= 0 || !args[0]->IsFunction()) { |
| 4068 throwTypeError(args.GetIsolate()); | 4068 throwTypeError(args.GetIsolate()); |
| 4069 return; | 4069 return; |
| 4070 } | 4070 } |
| 4071 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); | 4071 RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExe
cutionContext()); |
| 4072 imp->overloadedMethod(callback); | 4072 imp->overloadedMethod(callback); |
| 4073 | 4073 |
| 4074 return; | 4074 return; |
| 4075 } | 4075 } |
| 4076 | 4076 |
| 4077 static void overloadedMethod6Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 4077 static void overloadedMethod6Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 4078 { | 4078 { |
| 4079 if (args.Length() < 1) { | 4079 if (UNLIKELY(args.Length() < 1)) { |
| 4080 throwNotEnoughArgumentsError(args.GetIsolate()); | 4080 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4081 return; | 4081 return; |
| 4082 } | 4082 } |
| 4083 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4083 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4084 V8TRYCATCH_VOID(RefPtr<DOMStringList>, listArg, toDOMStringList(args[0], arg
s.GetIsolate())); | 4084 V8TRYCATCH_VOID(RefPtr<DOMStringList>, listArg, toDOMStringList(args[0], arg
s.GetIsolate())); |
| 4085 imp->overloadedMethod(listArg); | 4085 imp->overloadedMethod(listArg); |
| 4086 | 4086 |
| 4087 return; | 4087 return; |
| 4088 } | 4088 } |
| 4089 | 4089 |
| 4090 static void overloadedMethod7Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 4090 static void overloadedMethod7Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 4091 { | 4091 { |
| 4092 if (args.Length() < 1) { | 4092 if (UNLIKELY(args.Length() < 1)) { |
| 4093 throwNotEnoughArgumentsError(args.GetIsolate()); | 4093 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4094 return; | 4094 return; |
| 4095 } | 4095 } |
| 4096 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4096 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4097 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], arg
s.GetIsolate())); | 4097 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], arg
s.GetIsolate())); |
| 4098 imp->overloadedMethod(arrayArg); | 4098 imp->overloadedMethod(arrayArg); |
| 4099 | 4099 |
| 4100 return; | 4100 return; |
| 4101 } | 4101 } |
| 4102 | 4102 |
| 4103 static void overloadedMethod8Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 4103 static void overloadedMethod8Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 4104 { | 4104 { |
| 4105 if (args.Length() < 1) { | 4105 if (UNLIKELY(args.Length() < 1)) { |
| 4106 throwNotEnoughArgumentsError(args.GetIsolate()); | 4106 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4107 return; | 4107 return; |
| 4108 } | 4108 } |
| 4109 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4109 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4110 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[0])) : 0); | 4110 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge
tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(args[0])) : 0); |
| 4111 imp->overloadedMethod(objArg); | 4111 imp->overloadedMethod(objArg); |
| 4112 | 4112 |
| 4113 return; | 4113 return; |
| 4114 } | 4114 } |
| 4115 | 4115 |
| 4116 static void overloadedMethod9Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 4116 static void overloadedMethod9Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 4117 { | 4117 { |
| 4118 if (args.Length() < 1) { | 4118 if (UNLIKELY(args.Length() < 1)) { |
| 4119 throwNotEnoughArgumentsError(args.GetIsolate()); | 4119 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4120 return; | 4120 return; |
| 4121 } | 4121 } |
| 4122 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4122 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4123 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], arg
s.GetIsolate())); | 4123 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], arg
s.GetIsolate())); |
| 4124 imp->overloadedMethod(arrayArg); | 4124 imp->overloadedMethod(arrayArg); |
| 4125 | 4125 |
| 4126 return; | 4126 return; |
| 4127 } | 4127 } |
| 4128 | 4128 |
| 4129 static void overloadedMethod10Method(const v8::FunctionCallbackInfo<v8::Value>&
args) | 4129 static void overloadedMethod10Method(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 4130 { | 4130 { |
| 4131 if (args.Length() < 1) { | 4131 if (UNLIKELY(args.Length() < 1)) { |
| 4132 throwNotEnoughArgumentsError(args.GetIsolate()); | 4132 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4133 return; | 4133 return; |
| 4134 } | 4134 } |
| 4135 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4135 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4136 V8TRYCATCH_VOID(Vector<unsigned>, arrayArg, toNativeArray<unsigned>(args[0],
args.GetIsolate())); | 4136 V8TRYCATCH_VOID(Vector<unsigned>, arrayArg, toNativeArray<unsigned>(args[0],
args.GetIsolate())); |
| 4137 imp->overloadedMethod(arrayArg); | 4137 imp->overloadedMethod(arrayArg); |
| 4138 | 4138 |
| 4139 return; | 4139 return; |
| 4140 } | 4140 } |
| 4141 | 4141 |
| 4142 static void overloadedMethod11Method(const v8::FunctionCallbackInfo<v8::Value>&
args) | 4142 static void overloadedMethod11Method(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 4143 { | 4143 { |
| 4144 if (args.Length() < 1) { | 4144 if (UNLIKELY(args.Length() < 1)) { |
| 4145 throwNotEnoughArgumentsError(args.GetIsolate()); | 4145 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4146 return; | 4146 return; |
| 4147 } | 4147 } |
| 4148 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4148 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4149 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); | 4149 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); |
| 4150 imp->overloadedMethod(strArg); | 4150 imp->overloadedMethod(strArg); |
| 4151 | 4151 |
| 4152 return; | 4152 return; |
| 4153 } | 4153 } |
| 4154 | 4154 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4191 return; | 4191 return; |
| 4192 } | 4192 } |
| 4193 if ((args.Length() == 1 && (args[0]->IsArray()))) { | 4193 if ((args.Length() == 1 && (args[0]->IsArray()))) { |
| 4194 overloadedMethod10Method(args); | 4194 overloadedMethod10Method(args); |
| 4195 return; | 4195 return; |
| 4196 } | 4196 } |
| 4197 if (args.Length() == 1) { | 4197 if (args.Length() == 1) { |
| 4198 overloadedMethod11Method(args); | 4198 overloadedMethod11Method(args); |
| 4199 return; | 4199 return; |
| 4200 } | 4200 } |
| 4201 if (args.Length() < 1) { | 4201 if (UNLIKELY(args.Length() < 1)) { |
| 4202 throwNotEnoughArgumentsError(args.GetIsolate()); | 4202 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4203 return; | 4203 return; |
| 4204 } | 4204 } |
| 4205 throwTypeError(args.GetIsolate()); | 4205 throwTypeError(args.GetIsolate()); |
| 4206 } | 4206 } |
| 4207 | 4207 |
| 4208 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& args) | 4208 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& args) |
| 4209 { | 4209 { |
| 4210 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4210 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4211 TestObjV8Internal::overloadedMethodMethod(args); | 4211 TestObjV8Internal::overloadedMethodMethod(args); |
| 4212 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4212 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4213 } | 4213 } |
| 4214 | 4214 |
| 4215 static void classMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args) | 4215 static void classMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 4216 { | 4216 { |
| 4217 TestObj::classMethod(); | 4217 TestObj::classMethod(); |
| 4218 | 4218 |
| 4219 return; | 4219 return; |
| 4220 } | 4220 } |
| 4221 | 4221 |
| 4222 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
args) | 4222 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 4223 { | 4223 { |
| 4224 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4224 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4225 TestObjV8Internal::classMethodMethod(args); | 4225 TestObjV8Internal::classMethodMethod(args); |
| 4226 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4226 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4227 } | 4227 } |
| 4228 | 4228 |
| 4229 static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& args) | 4229 static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& args) |
| 4230 { | 4230 { |
| 4231 if (args.Length() <= 0) { | 4231 if (UNLIKELY(args.Length() <= 0)) { |
| 4232 v8SetReturnValueInt(args, TestObj::classMethodWithOptional()); | 4232 v8SetReturnValueInt(args, TestObj::classMethodWithOptional()); |
| 4233 return; | 4233 return; |
| 4234 } | 4234 } |
| 4235 V8TRYCATCH_VOID(int, arg, toInt32(args[0])); | 4235 V8TRYCATCH_VOID(int, arg, toInt32(args[0])); |
| 4236 v8SetReturnValueInt(args, TestObj::classMethodWithOptional(arg)); | 4236 v8SetReturnValueInt(args, TestObj::classMethodWithOptional(arg)); |
| 4237 return; | 4237 return; |
| 4238 } | 4238 } |
| 4239 | 4239 |
| 4240 static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& args) | 4240 static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& args) |
| 4241 { | 4241 { |
| 4242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4243 TestObjV8Internal::classMethodWithOptionalMethod(args); | 4243 TestObjV8Internal::classMethodWithOptionalMethod(args); |
| 4244 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4244 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4245 } | 4245 } |
| 4246 | 4246 |
| 4247 static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& args) | 4247 static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& args) |
| 4248 { | 4248 { |
| 4249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4250 V8TestObject::classMethod2MethodCustom(args); | 4250 V8TestObject::classMethod2MethodCustom(args); |
| 4251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4252 } | 4252 } |
| 4253 | 4253 |
| 4254 #if ENABLE(Condition1) | 4254 #if ENABLE(Condition1) |
| 4255 | 4255 |
| 4256 static void overloadedMethod11Method(const v8::FunctionCallbackInfo<v8::Value>&
args) | 4256 static void overloadedMethod11Method(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 4257 { | 4257 { |
| 4258 if (args.Length() < 1) { | 4258 if (UNLIKELY(args.Length() < 1)) { |
| 4259 throwNotEnoughArgumentsError(args.GetIsolate()); | 4259 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4260 return; | 4260 return; |
| 4261 } | 4261 } |
| 4262 V8TRYCATCH_VOID(int, arg, toInt32(args[0])); | 4262 V8TRYCATCH_VOID(int, arg, toInt32(args[0])); |
| 4263 TestObj::overloadedMethod1(arg); | 4263 TestObj::overloadedMethod1(arg); |
| 4264 | 4264 |
| 4265 return; | 4265 return; |
| 4266 } | 4266 } |
| 4267 | 4267 |
| 4268 #endif // ENABLE(Condition1) | 4268 #endif // ENABLE(Condition1) |
| 4269 | 4269 |
| 4270 #if ENABLE(Condition1) | 4270 #if ENABLE(Condition1) |
| 4271 | 4271 |
| 4272 static void overloadedMethod12Method(const v8::FunctionCallbackInfo<v8::Value>&
args) | 4272 static void overloadedMethod12Method(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 4273 { | 4273 { |
| 4274 if (args.Length() < 1) { | 4274 if (UNLIKELY(args.Length() < 1)) { |
| 4275 throwNotEnoughArgumentsError(args.GetIsolate()); | 4275 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4276 return; | 4276 return; |
| 4277 } | 4277 } |
| 4278 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, args[0]); | 4278 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, args[0]); |
| 4279 TestObj::overloadedMethod1(type); | 4279 TestObj::overloadedMethod1(type); |
| 4280 | 4280 |
| 4281 return; | 4281 return; |
| 4282 } | 4282 } |
| 4283 | 4283 |
| 4284 #endif // ENABLE(Condition1) | 4284 #endif // ENABLE(Condition1) |
| 4285 | 4285 |
| 4286 #if ENABLE(Condition1) | 4286 #if ENABLE(Condition1) |
| 4287 | 4287 |
| 4288 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 4288 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 4289 { | 4289 { |
| 4290 if (args.Length() == 1) { | 4290 if (args.Length() == 1) { |
| 4291 overloadedMethod11Method(args); | 4291 overloadedMethod11Method(args); |
| 4292 return; | 4292 return; |
| 4293 } | 4293 } |
| 4294 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsUndefined() || a
rgs[0]->IsString() || args[0]->IsObject()))) { | 4294 if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsUndefined() || a
rgs[0]->IsString() || args[0]->IsObject()))) { |
| 4295 overloadedMethod12Method(args); | 4295 overloadedMethod12Method(args); |
| 4296 return; | 4296 return; |
| 4297 } | 4297 } |
| 4298 if (args.Length() < 1) { | 4298 if (UNLIKELY(args.Length() < 1)) { |
| 4299 throwNotEnoughArgumentsError(args.GetIsolate()); | 4299 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4300 return; | 4300 return; |
| 4301 } | 4301 } |
| 4302 throwTypeError(args.GetIsolate()); | 4302 throwTypeError(args.GetIsolate()); |
| 4303 } | 4303 } |
| 4304 | 4304 |
| 4305 #endif // ENABLE(Condition1) | 4305 #endif // ENABLE(Condition1) |
| 4306 | 4306 |
| 4307 #if ENABLE(Condition1) | 4307 #if ENABLE(Condition1) |
| 4308 | 4308 |
| 4309 static void overloadedMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& args) | 4309 static void overloadedMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& args) |
| 4310 { | 4310 { |
| 4311 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4311 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4312 TestObjV8Internal::overloadedMethod1Method(args); | 4312 TestObjV8Internal::overloadedMethod1Method(args); |
| 4313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4314 } | 4314 } |
| 4315 | 4315 |
| 4316 #endif // ENABLE(Condition1) | 4316 #endif // ENABLE(Condition1) |
| 4317 | 4317 |
| 4318 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value>
& args) | 4318 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value>
& args) |
| 4319 { | 4319 { |
| 4320 if (args.Length() < 2) { | 4320 if (UNLIKELY(args.Length() < 2)) { |
| 4321 throwNotEnoughArgumentsError(args.GetIsolate()); | 4321 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4322 return; | 4322 return; |
| 4323 } | 4323 } |
| 4324 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4324 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4325 unsigned short objArgsShort = 0; | 4325 unsigned short objArgsShort = 0; |
| 4326 V8TRYCATCH_VOID(double, objArgsShortNativeValue, args[0]->NumberValue()); | 4326 V8TRYCATCH_VOID(double, objArgsShortNativeValue, args[0]->NumberValue()); |
| 4327 if (!std::isnan(objArgsShortNativeValue)) | 4327 if (!std::isnan(objArgsShortNativeValue)) |
| 4328 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); | 4328 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); |
| 4329 unsigned long objArgsLong = 0; | 4329 unsigned long objArgsLong = 0; |
| 4330 V8TRYCATCH_VOID(double, objArgsLongNativeValue, args[1]->NumberValue()); | 4330 V8TRYCATCH_VOID(double, objArgsLongNativeValue, args[1]->NumberValue()); |
| 4331 if (!std::isnan(objArgsLongNativeValue)) | 4331 if (!std::isnan(objArgsLongNativeValue)) |
| 4332 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); | 4332 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); |
| 4333 imp->classMethodWithClamp(objArgsShort, objArgsLong); | 4333 imp->classMethodWithClamp(objArgsShort, objArgsLong); |
| 4334 | 4334 |
| 4335 return; | 4335 return; |
| 4336 } | 4336 } |
| 4337 | 4337 |
| 4338 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& args) | 4338 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& args) |
| 4339 { | 4339 { |
| 4340 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4340 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4341 TestObjV8Internal::classMethodWithClampMethod(args); | 4341 TestObjV8Internal::classMethodWithClampMethod(args); |
| 4342 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4342 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4343 } | 4343 } |
| 4344 | 4344 |
| 4345 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& args) | 4345 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& args) |
| 4346 { | 4346 { |
| 4347 if (args.Length() < 1) { | 4347 if (UNLIKELY(args.Length() < 1)) { |
| 4348 throwNotEnoughArgumentsError(args.GetIsolate()); | 4348 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4349 return; | 4349 return; |
| 4350 } | 4350 } |
| 4351 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4351 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4352 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4352 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4353 imp->enabledAtRuntimeMethod(longArg); | 4353 imp->enabledAtRuntimeMethod(longArg); |
| 4354 | 4354 |
| 4355 return; | 4355 return; |
| 4356 } | 4356 } |
| 4357 | 4357 |
| 4358 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& args) | 4358 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& args) |
| 4359 { | 4359 { |
| 4360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4361 TestObjV8Internal::enabledAtRuntimeMethodMethod(args); | 4361 TestObjV8Internal::enabledAtRuntimeMethodMethod(args); |
| 4362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4363 } | 4363 } |
| 4364 | 4364 |
| 4365 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& args) | 4365 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& args) |
| 4366 { | 4366 { |
| 4367 if (args.Length() < 1) { | 4367 if (UNLIKELY(args.Length() < 1)) { |
| 4368 throwNotEnoughArgumentsError(args.GetIsolate()); | 4368 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4369 return; | 4369 return; |
| 4370 } | 4370 } |
| 4371 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4371 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4372 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4372 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4373 imp->enabledPerContextMethod(longArg); | 4373 imp->enabledPerContextMethod(longArg); |
| 4374 | 4374 |
| 4375 return; | 4375 return; |
| 4376 } | 4376 } |
| 4377 | 4377 |
| 4378 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& args) | 4378 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& args) |
| 4379 { | 4379 { |
| 4380 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4380 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4381 TestObjV8Internal::enabledPerContextMethodMethod(args); | 4381 TestObjV8Internal::enabledPerContextMethodMethod(args); |
| 4382 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4382 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4383 } | 4383 } |
| 4384 | 4384 |
| 4385 static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo<
v8::Value>& args) | 4385 static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo<
v8::Value>& args) |
| 4386 { | 4386 { |
| 4387 if (args.Length() < 1) { | 4387 if (UNLIKELY(args.Length() < 1)) { |
| 4388 throwNotEnoughArgumentsError(args.GetIsolate()); | 4388 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4389 return; | 4389 return; |
| 4390 } | 4390 } |
| 4391 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4391 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4392 V8TRYCATCH_VOID(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsign
ed>(args[0], args.GetIsolate())); | 4392 V8TRYCATCH_VOID(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsign
ed>(args[0], args.GetIsolate())); |
| 4393 imp->methodWithUnsignedLongSequence(unsignedLongSequence); | 4393 imp->methodWithUnsignedLongSequence(unsignedLongSequence); |
| 4394 | 4394 |
| 4395 return; | 4395 return; |
| 4396 } | 4396 } |
| 4397 | 4397 |
| 4398 static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& args) | 4398 static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& args) |
| 4399 { | 4399 { |
| 4400 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4400 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4401 TestObjV8Internal::methodWithUnsignedLongSequenceMethod(args); | 4401 TestObjV8Internal::methodWithUnsignedLongSequenceMethod(args); |
| 4402 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4402 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4403 } | 4403 } |
| 4404 | 4404 |
| 4405 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>&
args) | 4405 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 4406 { | 4406 { |
| 4407 if (args.Length() < 1) { | 4407 if (UNLIKELY(args.Length() < 1)) { |
| 4408 throwNotEnoughArgumentsError(args.GetIsolate()); | 4408 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4409 return; | 4409 return; |
| 4410 } | 4410 } |
| 4411 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4411 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4412 ExceptionState es(args.GetIsolate()); | 4412 ExceptionState es(args.GetIsolate()); |
| 4413 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(args[0], args.
GetIsolate())); | 4413 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(args[0], args.
GetIsolate())); |
| 4414 Vector<String> result = imp->stringArrayFunction(values, es); | 4414 Vector<String> result = imp->stringArrayFunction(values, es); |
| 4415 if (es.throwIfNeeded()) | 4415 if (es.throwIfNeeded()) |
| 4416 return; | 4416 return; |
| 4417 v8SetReturnValue(args, v8Array(result, args.GetIsolate())); | 4417 v8SetReturnValue(args, v8Array(result, args.GetIsolate())); |
| 4418 return; | 4418 return; |
| 4419 } | 4419 } |
| 4420 | 4420 |
| 4421 static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& args) | 4421 static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& args) |
| 4422 { | 4422 { |
| 4423 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4423 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4424 TestObjV8Internal::stringArrayFunctionMethod(args); | 4424 TestObjV8Internal::stringArrayFunctionMethod(args); |
| 4425 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4425 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4426 } | 4426 } |
| 4427 | 4427 |
| 4428 static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value
>& args) | 4428 static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value
>& args) |
| 4429 { | 4429 { |
| 4430 if (args.Length() < 1) { | 4430 if (UNLIKELY(args.Length() < 1)) { |
| 4431 throwNotEnoughArgumentsError(args.GetIsolate()); | 4431 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4432 return; | 4432 return; |
| 4433 } | 4433 } |
| 4434 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4434 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4435 ExceptionState es(args.GetIsolate()); | 4435 ExceptionState es(args.GetIsolate()); |
| 4436 V8TRYCATCH_VOID(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args
.GetIsolate())); | 4436 V8TRYCATCH_VOID(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args
.GetIsolate())); |
| 4437 RefPtr<DOMStringList> result = imp->domStringListFunction(values, es); | 4437 RefPtr<DOMStringList> result = imp->domStringListFunction(values, es); |
| 4438 if (es.throwIfNeeded()) | 4438 if (es.throwIfNeeded()) |
| 4439 return; | 4439 return; |
| 4440 v8SetReturnValue(args, result.release(), args.Holder()); | 4440 v8SetReturnValue(args, result.release(), args.Holder()); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 4465 | 4465 |
| 4466 static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& args) | 4466 static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& args) |
| 4467 { | 4467 { |
| 4468 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4468 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4469 TestObjV8Internal::getSVGDocumentMethod(args); | 4469 TestObjV8Internal::getSVGDocumentMethod(args); |
| 4470 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4470 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4471 } | 4471 } |
| 4472 | 4472 |
| 4473 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& args) | 4473 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 4474 { | 4474 { |
| 4475 if (args.Length() < 1) { | 4475 if (UNLIKELY(args.Length() < 1)) { |
| 4476 throwNotEnoughArgumentsError(args.GetIsolate()); | 4476 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4477 return; | 4477 return; |
| 4478 } | 4478 } |
| 4479 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4479 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4480 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); | 4480 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); |
| 4481 imp->convert1(value); | 4481 imp->convert1(value); |
| 4482 | 4482 |
| 4483 return; | 4483 return; |
| 4484 } | 4484 } |
| 4485 | 4485 |
| 4486 static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar
gs) | 4486 static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar
gs) |
| 4487 { | 4487 { |
| 4488 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4488 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4489 TestObjV8Internal::convert1Method(args); | 4489 TestObjV8Internal::convert1Method(args); |
| 4490 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4490 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4491 } | 4491 } |
| 4492 | 4492 |
| 4493 static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& args) | 4493 static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 4494 { | 4494 { |
| 4495 if (args.Length() < 1) { | 4495 if (UNLIKELY(args.Length() < 1)) { |
| 4496 throwNotEnoughArgumentsError(args.GetIsolate()); | 4496 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4497 return; | 4497 return; |
| 4498 } | 4498 } |
| 4499 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4499 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4500 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); | 4500 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); |
| 4501 imp->convert2(value); | 4501 imp->convert2(value); |
| 4502 | 4502 |
| 4503 return; | 4503 return; |
| 4504 } | 4504 } |
| 4505 | 4505 |
| 4506 static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar
gs) | 4506 static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar
gs) |
| 4507 { | 4507 { |
| 4508 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4508 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4509 TestObjV8Internal::convert2Method(args); | 4509 TestObjV8Internal::convert2Method(args); |
| 4510 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4510 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4511 } | 4511 } |
| 4512 | 4512 |
| 4513 static void convert4Method(const v8::FunctionCallbackInfo<v8::Value>& args) | 4513 static void convert4Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 4514 { | 4514 { |
| 4515 if (args.Length() < 1) { | 4515 if (UNLIKELY(args.Length() < 1)) { |
| 4516 throwNotEnoughArgumentsError(args.GetIsolate()); | 4516 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4517 return; | 4517 return; |
| 4518 } | 4518 } |
| 4519 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4519 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4520 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); | 4520 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); |
| 4521 imp->convert4(value); | 4521 imp->convert4(value); |
| 4522 | 4522 |
| 4523 return; | 4523 return; |
| 4524 } | 4524 } |
| 4525 | 4525 |
| 4526 static void convert4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar
gs) | 4526 static void convert4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar
gs) |
| 4527 { | 4527 { |
| 4528 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4528 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4529 TestObjV8Internal::convert4Method(args); | 4529 TestObjV8Internal::convert4Method(args); |
| 4530 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4530 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4531 } | 4531 } |
| 4532 | 4532 |
| 4533 static void convert5Method(const v8::FunctionCallbackInfo<v8::Value>& args) | 4533 static void convert5Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 4534 { | 4534 { |
| 4535 if (args.Length() < 1) { | 4535 if (UNLIKELY(args.Length() < 1)) { |
| 4536 throwNotEnoughArgumentsError(args.GetIsolate()); | 4536 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4537 return; | 4537 return; |
| 4538 } | 4538 } |
| 4539 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4539 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4540 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); | 4540 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); |
| 4541 imp->convert5(value); | 4541 imp->convert5(value); |
| 4542 | 4542 |
| 4543 return; | 4543 return; |
| 4544 } | 4544 } |
| 4545 | 4545 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4588 | 4588 |
| 4589 static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args
) | 4589 static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args
) |
| 4590 { | 4590 { |
| 4591 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4591 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4592 TestObjV8Internal::orangeMethod(args); | 4592 TestObjV8Internal::orangeMethod(args); |
| 4593 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4593 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4594 } | 4594 } |
| 4595 | 4595 |
| 4596 static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args
) | 4596 static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args
) |
| 4597 { | 4597 { |
| 4598 if (args.Length() < 3) { | 4598 if (UNLIKELY(args.Length() < 3)) { |
| 4599 throwNotEnoughArgumentsError(args.GetIsolate()); | 4599 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4600 return; | 4600 return; |
| 4601 } | 4601 } |
| 4602 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4602 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4603 ExceptionState es(args.GetIsolate()); | 4603 ExceptionState es(args.GetIsolate()); |
| 4604 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]); | 4604 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]); |
| 4605 V8TRYCATCH_VOID(float, a, static_cast<float>(args[1]->NumberValue())); | 4605 V8TRYCATCH_VOID(float, a, static_cast<float>(args[1]->NumberValue())); |
| 4606 V8TRYCATCH_VOID(int, b, toInt32(args[2])); | 4606 V8TRYCATCH_VOID(int, b, toInt32(args[2])); |
| 4607 bool result = imp->strictFunction(str, a, b, es); | 4607 bool result = imp->strictFunction(str, a, b, es); |
| 4608 if (es.throwIfNeeded()) | 4608 if (es.throwIfNeeded()) |
| 4609 return; | 4609 return; |
| 4610 v8SetReturnValueBool(args, result); | 4610 v8SetReturnValueBool(args, result); |
| 4611 return; | 4611 return; |
| 4612 } | 4612 } |
| 4613 | 4613 |
| 4614 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& args) | 4614 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& args) |
| 4615 { | 4615 { |
| 4616 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4616 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4617 TestObjV8Internal::strictFunctionMethod(args); | 4617 TestObjV8Internal::strictFunctionMethod(args); |
| 4618 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4618 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4619 } | 4619 } |
| 4620 | 4620 |
| 4621 static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& args) | 4621 static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& args) |
| 4622 { | 4622 { |
| 4623 if (args.Length() < 1) { | 4623 if (UNLIKELY(args.Length() < 1)) { |
| 4624 throwNotEnoughArgumentsError(args.GetIsolate()); | 4624 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4625 return; | 4625 return; |
| 4626 } | 4626 } |
| 4627 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4627 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4628 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, head, args[0]); | 4628 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, head, args[0]); |
| 4629 V8TRYCATCH_VOID(Vector<String>, tail, toNativeArguments<String>(args, 1)); | 4629 V8TRYCATCH_VOID(Vector<String>, tail, toNativeArguments<String>(args, 1)); |
| 4630 imp->variadicStringMethod(head, tail); | 4630 imp->variadicStringMethod(head, tail); |
| 4631 | 4631 |
| 4632 return; | 4632 return; |
| 4633 } | 4633 } |
| 4634 | 4634 |
| 4635 static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& args) | 4635 static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& args) |
| 4636 { | 4636 { |
| 4637 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4637 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4638 TestObjV8Internal::variadicStringMethodMethod(args); | 4638 TestObjV8Internal::variadicStringMethodMethod(args); |
| 4639 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4639 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4640 } | 4640 } |
| 4641 | 4641 |
| 4642 static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& args) | 4642 static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& args) |
| 4643 { | 4643 { |
| 4644 if (args.Length() < 1) { | 4644 if (UNLIKELY(args.Length() < 1)) { |
| 4645 throwNotEnoughArgumentsError(args.GetIsolate()); | 4645 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4646 return; | 4646 return; |
| 4647 } | 4647 } |
| 4648 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4648 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4649 V8TRYCATCH_VOID(double, head, static_cast<double>(args[0]->NumberValue())); | 4649 V8TRYCATCH_VOID(double, head, static_cast<double>(args[0]->NumberValue())); |
| 4650 V8TRYCATCH_VOID(Vector<double>, tail, toNativeArguments<double>(args, 1)); | 4650 V8TRYCATCH_VOID(Vector<double>, tail, toNativeArguments<double>(args, 1)); |
| 4651 imp->variadicDoubleMethod(head, tail); | 4651 imp->variadicDoubleMethod(head, tail); |
| 4652 | 4652 |
| 4653 return; | 4653 return; |
| 4654 } | 4654 } |
| 4655 | 4655 |
| 4656 static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& args) | 4656 static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& args) |
| 4657 { | 4657 { |
| 4658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4659 TestObjV8Internal::variadicDoubleMethodMethod(args); | 4659 TestObjV8Internal::variadicDoubleMethodMethod(args); |
| 4660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4661 } | 4661 } |
| 4662 | 4662 |
| 4663 static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
args) | 4663 static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 4664 { | 4664 { |
| 4665 if (args.Length() < 1) { | 4665 if (UNLIKELY(args.Length() < 1)) { |
| 4666 throwNotEnoughArgumentsError(args.GetIsolate()); | 4666 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4667 return; | 4667 return; |
| 4668 } | 4668 } |
| 4669 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4669 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4670 V8TRYCATCH_VOID(Node*, head, V8Node::HasInstance(args[0], args.GetIsolate(),
worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(a
rgs[0])) : 0); | 4670 V8TRYCATCH_VOID(Node*, head, V8Node::HasInstance(args[0], args.GetIsolate(),
worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(a
rgs[0])) : 0); |
| 4671 Vector<RefPtr<Node> > tail; | 4671 Vector<RefPtr<Node> > tail; |
| 4672 for (int i = 1; i < args.Length(); ++i) { | 4672 for (int i = 1; i < args.Length(); ++i) { |
| 4673 if (!V8Node::HasInstance(args[i], args.GetIsolate(), worldType(args.GetI
solate()))) { | 4673 if (!V8Node::HasInstance(args[i], args.GetIsolate(), worldType(args.GetI
solate()))) { |
| 4674 throwTypeError(args.GetIsolate()); | 4674 throwTypeError(args.GetIsolate()); |
| 4675 return; | 4675 return; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4713 | 4713 |
| 4714 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI
nfo<v8::Value>& args) | 4714 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI
nfo<v8::Value>& args) |
| 4715 { | 4715 { |
| 4716 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4716 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4717 TestObjV8Internal::perWorldMethodMethodForMainWorld(args); | 4717 TestObjV8Internal::perWorldMethodMethodForMainWorld(args); |
| 4718 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4718 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4719 } | 4719 } |
| 4720 | 4720 |
| 4721 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V
alue>& args) | 4721 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V
alue>& args) |
| 4722 { | 4722 { |
| 4723 if (args.Length() < 1) { | 4723 if (UNLIKELY(args.Length() < 1)) { |
| 4724 throwNotEnoughArgumentsError(args.GetIsolate()); | 4724 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4725 return; | 4725 return; |
| 4726 } | 4726 } |
| 4727 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4727 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4728 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4728 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4729 imp->overloadedPerWorldMethod(longArg); | 4729 imp->overloadedPerWorldMethod(longArg); |
| 4730 | 4730 |
| 4731 return; | 4731 return; |
| 4732 } | 4732 } |
| 4733 | 4733 |
| 4734 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba
ckInfo<v8::Value>& args) | 4734 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba
ckInfo<v8::Value>& args) |
| 4735 { | 4735 { |
| 4736 if (args.Length() < 1) { | 4736 if (UNLIKELY(args.Length() < 1)) { |
| 4737 throwNotEnoughArgumentsError(args.GetIsolate()); | 4737 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4738 return; | 4738 return; |
| 4739 } | 4739 } |
| 4740 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4740 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4741 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4741 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4742 imp->overloadedPerWorldMethod(longArg); | 4742 imp->overloadedPerWorldMethod(longArg); |
| 4743 | 4743 |
| 4744 return; | 4744 return; |
| 4745 } | 4745 } |
| 4746 | 4746 |
| 4747 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& args) | 4747 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& args) |
| 4748 { | 4748 { |
| 4749 if (args.Length() < 2) { | 4749 if (UNLIKELY(args.Length() < 2)) { |
| 4750 throwNotEnoughArgumentsError(args.GetIsolate()); | 4750 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4751 return; | 4751 return; |
| 4752 } | 4752 } |
| 4753 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4753 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4754 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); | 4754 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); |
| 4755 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); | 4755 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); |
| 4756 imp->overloadedPerWorldMethod(strArg, longArg); | 4756 imp->overloadedPerWorldMethod(strArg, longArg); |
| 4757 | 4757 |
| 4758 return; | 4758 return; |
| 4759 } | 4759 } |
| 4760 | 4760 |
| 4761 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba
ckInfo<v8::Value>& args) | 4761 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba
ckInfo<v8::Value>& args) |
| 4762 { | 4762 { |
| 4763 if (args.Length() < 2) { | 4763 if (UNLIKELY(args.Length() < 2)) { |
| 4764 throwNotEnoughArgumentsError(args.GetIsolate()); | 4764 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4765 return; | 4765 return; |
| 4766 } | 4766 } |
| 4767 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4767 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4768 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); | 4768 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); |
| 4769 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); | 4769 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); |
| 4770 imp->overloadedPerWorldMethod(strArg, longArg); | 4770 imp->overloadedPerWorldMethod(strArg, longArg); |
| 4771 | 4771 |
| 4772 return; | 4772 return; |
| 4773 } | 4773 } |
| 4774 | 4774 |
| 4775 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& args) | 4775 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& args) |
| 4776 { | 4776 { |
| 4777 if (args.Length() == 1) { | 4777 if (args.Length() == 1) { |
| 4778 overloadedPerWorldMethod1Method(args); | 4778 overloadedPerWorldMethod1Method(args); |
| 4779 return; | 4779 return; |
| 4780 } | 4780 } |
| 4781 if (args.Length() == 2) { | 4781 if (args.Length() == 2) { |
| 4782 overloadedPerWorldMethod2Method(args); | 4782 overloadedPerWorldMethod2Method(args); |
| 4783 return; | 4783 return; |
| 4784 } | 4784 } |
| 4785 if (args.Length() < 1) { | 4785 if (UNLIKELY(args.Length() < 1)) { |
| 4786 throwNotEnoughArgumentsError(args.GetIsolate()); | 4786 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4787 return; | 4787 return; |
| 4788 } | 4788 } |
| 4789 throwTypeError(args.GetIsolate()); | 4789 throwTypeError(args.GetIsolate()); |
| 4790 } | 4790 } |
| 4791 | 4791 |
| 4792 static void overloadedPerWorldMethodMethodForMainWorld(const v8::FunctionCallbac
kInfo<v8::Value>& args) | 4792 static void overloadedPerWorldMethodMethodForMainWorld(const v8::FunctionCallbac
kInfo<v8::Value>& args) |
| 4793 { | 4793 { |
| 4794 if (args.Length() == 1) { | 4794 if (args.Length() == 1) { |
| 4795 overloadedPerWorldMethod1MethodForMainWorld(args); | 4795 overloadedPerWorldMethod1MethodForMainWorld(args); |
| 4796 return; | 4796 return; |
| 4797 } | 4797 } |
| 4798 if (args.Length() == 2) { | 4798 if (args.Length() == 2) { |
| 4799 overloadedPerWorldMethod2MethodForMainWorld(args); | 4799 overloadedPerWorldMethod2MethodForMainWorld(args); |
| 4800 return; | 4800 return; |
| 4801 } | 4801 } |
| 4802 if (args.Length() < 1) { | 4802 if (UNLIKELY(args.Length() < 1)) { |
| 4803 throwNotEnoughArgumentsError(args.GetIsolate()); | 4803 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4804 return; | 4804 return; |
| 4805 } | 4805 } |
| 4806 throwTypeError(args.GetIsolate()); | 4806 throwTypeError(args.GetIsolate()); |
| 4807 } | 4807 } |
| 4808 | 4808 |
| 4809 static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& args) | 4809 static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& args) |
| 4810 { | 4810 { |
| 4811 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4811 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4812 TestObjV8Internal::overloadedPerWorldMethodMethod(args); | 4812 TestObjV8Internal::overloadedPerWorldMethodMethod(args); |
| 4813 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4813 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4814 } | 4814 } |
| 4815 | 4815 |
| 4816 static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::Functio
nCallbackInfo<v8::Value>& args) | 4816 static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::Functio
nCallbackInfo<v8::Value>& args) |
| 4817 { | 4817 { |
| 4818 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4818 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4819 TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(args); | 4819 TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(args); |
| 4820 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4820 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4821 } | 4821 } |
| 4822 | 4822 |
| 4823 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value
>& args) | 4823 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value
>& args) |
| 4824 { | 4824 { |
| 4825 if (args.Length() < 1) { | 4825 if (UNLIKELY(args.Length() < 1)) { |
| 4826 throwNotEnoughArgumentsError(args.GetIsolate()); | 4826 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4827 return; | 4827 return; |
| 4828 } | 4828 } |
| 4829 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4829 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4830 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4830 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4831 imp->activityLoggedMethod1(longArg); | 4831 imp->activityLoggedMethod1(longArg); |
| 4832 | 4832 |
| 4833 return; | 4833 return; |
| 4834 } | 4834 } |
| 4835 | 4835 |
| 4836 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& args) | 4836 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& args) |
| 4837 { | 4837 { |
| 4838 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4838 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4839 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 4839 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| 4840 if (contextData && contextData->activityLogger()) { | 4840 if (contextData && contextData->activityLogger()) { |
| 4841 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 4841 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 4842 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", a
rgs.Length(), loggerArgs.data(), "Method"); | 4842 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", a
rgs.Length(), loggerArgs.data(), "Method"); |
| 4843 } | 4843 } |
| 4844 TestObjV8Internal::activityLoggedMethod1Method(args); | 4844 TestObjV8Internal::activityLoggedMethod1Method(args); |
| 4845 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4845 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4846 } | 4846 } |
| 4847 | 4847 |
| 4848 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value
>& args) | 4848 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value
>& args) |
| 4849 { | 4849 { |
| 4850 if (args.Length() < 1) { | 4850 if (UNLIKELY(args.Length() < 1)) { |
| 4851 throwNotEnoughArgumentsError(args.GetIsolate()); | 4851 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4852 return; | 4852 return; |
| 4853 } | 4853 } |
| 4854 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4854 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4855 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4855 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4856 imp->activityLoggedMethod2(longArg); | 4856 imp->activityLoggedMethod2(longArg); |
| 4857 | 4857 |
| 4858 return; | 4858 return; |
| 4859 } | 4859 } |
| 4860 | 4860 |
| 4861 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn
fo<v8::Value>& args) | 4861 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn
fo<v8::Value>& args) |
| 4862 { | 4862 { |
| 4863 if (args.Length() < 1) { | 4863 if (UNLIKELY(args.Length() < 1)) { |
| 4864 throwNotEnoughArgumentsError(args.GetIsolate()); | 4864 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4865 return; | 4865 return; |
| 4866 } | 4866 } |
| 4867 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4867 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4868 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4868 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4869 imp->activityLoggedMethod2(longArg); | 4869 imp->activityLoggedMethod2(longArg); |
| 4870 | 4870 |
| 4871 return; | 4871 return; |
| 4872 } | 4872 } |
| 4873 | 4873 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4890 if (contextData && contextData->activityLogger()) { | 4890 if (contextData && contextData->activityLogger()) { |
| 4891 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); | 4891 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); |
| 4892 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a
rgs.Length(), loggerArgs.data(), "Method"); | 4892 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", a
rgs.Length(), loggerArgs.data(), "Method"); |
| 4893 } | 4893 } |
| 4894 TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(args); | 4894 TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(args); |
| 4895 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4895 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4896 } | 4896 } |
| 4897 | 4897 |
| 4898 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback
Info<v8::Value>& args) | 4898 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback
Info<v8::Value>& args) |
| 4899 { | 4899 { |
| 4900 if (args.Length() < 1) { | 4900 if (UNLIKELY(args.Length() < 1)) { |
| 4901 throwNotEnoughArgumentsError(args.GetIsolate()); | 4901 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4902 return; | 4902 return; |
| 4903 } | 4903 } |
| 4904 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4904 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4905 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4905 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4906 imp->activityLoggedInIsolatedWorldMethod(longArg); | 4906 imp->activityLoggedInIsolatedWorldMethod(longArg); |
| 4907 | 4907 |
| 4908 return; | 4908 return; |
| 4909 } | 4909 } |
| 4910 | 4910 |
| 4911 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func
tionCallbackInfo<v8::Value>& args) | 4911 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func
tionCallbackInfo<v8::Value>& args) |
| 4912 { | 4912 { |
| 4913 if (args.Length() < 1) { | 4913 if (UNLIKELY(args.Length() < 1)) { |
| 4914 throwNotEnoughArgumentsError(args.GetIsolate()); | 4914 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4915 return; | 4915 return; |
| 4916 } | 4916 } |
| 4917 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4917 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4918 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4918 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4919 imp->activityLoggedInIsolatedWorldMethod(longArg); | 4919 imp->activityLoggedInIsolatedWorldMethod(longArg); |
| 4920 | 4920 |
| 4921 return; | 4921 return; |
| 4922 } | 4922 } |
| 4923 | 4923 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4935 | 4935 |
| 4936 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const
v8::FunctionCallbackInfo<v8::Value>& args) | 4936 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const
v8::FunctionCallbackInfo<v8::Value>& args) |
| 4937 { | 4937 { |
| 4938 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4938 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4939 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(arg
s); | 4939 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(arg
s); |
| 4940 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4940 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4941 } | 4941 } |
| 4942 | 4942 |
| 4943 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo
<v8::Value>& args) | 4943 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo
<v8::Value>& args) |
| 4944 { | 4944 { |
| 4945 if (args.Length() < 1) { | 4945 if (UNLIKELY(args.Length() < 1)) { |
| 4946 throwNotEnoughArgumentsError(args.GetIsolate()); | 4946 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4947 return; | 4947 return; |
| 4948 } | 4948 } |
| 4949 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4949 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4950 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4950 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4951 imp->overloadedActivityLoggedMethod(longArg); | 4951 imp->overloadedActivityLoggedMethod(longArg); |
| 4952 | 4952 |
| 4953 return; | 4953 return; |
| 4954 } | 4954 } |
| 4955 | 4955 |
| 4956 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function
CallbackInfo<v8::Value>& args) | 4956 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function
CallbackInfo<v8::Value>& args) |
| 4957 { | 4957 { |
| 4958 if (args.Length() < 1) { | 4958 if (UNLIKELY(args.Length() < 1)) { |
| 4959 throwNotEnoughArgumentsError(args.GetIsolate()); | 4959 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4960 return; | 4960 return; |
| 4961 } | 4961 } |
| 4962 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4962 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4963 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); | 4963 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); |
| 4964 imp->overloadedActivityLoggedMethod(longArg); | 4964 imp->overloadedActivityLoggedMethod(longArg); |
| 4965 | 4965 |
| 4966 return; | 4966 return; |
| 4967 } | 4967 } |
| 4968 | 4968 |
| 4969 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo
<v8::Value>& args) | 4969 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo
<v8::Value>& args) |
| 4970 { | 4970 { |
| 4971 if (args.Length() < 2) { | 4971 if (UNLIKELY(args.Length() < 2)) { |
| 4972 throwNotEnoughArgumentsError(args.GetIsolate()); | 4972 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4973 return; | 4973 return; |
| 4974 } | 4974 } |
| 4975 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4975 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4976 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); | 4976 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); |
| 4977 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); | 4977 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); |
| 4978 imp->overloadedActivityLoggedMethod(strArg, longArg); | 4978 imp->overloadedActivityLoggedMethod(strArg, longArg); |
| 4979 | 4979 |
| 4980 return; | 4980 return; |
| 4981 } | 4981 } |
| 4982 | 4982 |
| 4983 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function
CallbackInfo<v8::Value>& args) | 4983 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function
CallbackInfo<v8::Value>& args) |
| 4984 { | 4984 { |
| 4985 if (args.Length() < 2) { | 4985 if (UNLIKELY(args.Length() < 2)) { |
| 4986 throwNotEnoughArgumentsError(args.GetIsolate()); | 4986 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 4987 return; | 4987 return; |
| 4988 } | 4988 } |
| 4989 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4989 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4990 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); | 4990 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); |
| 4991 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); | 4991 V8TRYCATCH_VOID(int, longArg, toInt32(args[1])); |
| 4992 imp->overloadedActivityLoggedMethod(strArg, longArg); | 4992 imp->overloadedActivityLoggedMethod(strArg, longArg); |
| 4993 | 4993 |
| 4994 return; | 4994 return; |
| 4995 } | 4995 } |
| 4996 | 4996 |
| 4997 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& args) | 4997 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& args) |
| 4998 { | 4998 { |
| 4999 if (args.Length() == 1) { | 4999 if (args.Length() == 1) { |
| 5000 overloadedActivityLoggedMethod1Method(args); | 5000 overloadedActivityLoggedMethod1Method(args); |
| 5001 return; | 5001 return; |
| 5002 } | 5002 } |
| 5003 if (args.Length() == 2) { | 5003 if (args.Length() == 2) { |
| 5004 overloadedActivityLoggedMethod2Method(args); | 5004 overloadedActivityLoggedMethod2Method(args); |
| 5005 return; | 5005 return; |
| 5006 } | 5006 } |
| 5007 if (args.Length() < 1) { | 5007 if (UNLIKELY(args.Length() < 1)) { |
| 5008 throwNotEnoughArgumentsError(args.GetIsolate()); | 5008 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 5009 return; | 5009 return; |
| 5010 } | 5010 } |
| 5011 throwTypeError(args.GetIsolate()); | 5011 throwTypeError(args.GetIsolate()); |
| 5012 } | 5012 } |
| 5013 | 5013 |
| 5014 static void overloadedActivityLoggedMethodMethodForMainWorld(const v8::FunctionC
allbackInfo<v8::Value>& args) | 5014 static void overloadedActivityLoggedMethodMethodForMainWorld(const v8::FunctionC
allbackInfo<v8::Value>& args) |
| 5015 { | 5015 { |
| 5016 if (args.Length() == 1) { | 5016 if (args.Length() == 1) { |
| 5017 overloadedActivityLoggedMethod1MethodForMainWorld(args); | 5017 overloadedActivityLoggedMethod1MethodForMainWorld(args); |
| 5018 return; | 5018 return; |
| 5019 } | 5019 } |
| 5020 if (args.Length() == 2) { | 5020 if (args.Length() == 2) { |
| 5021 overloadedActivityLoggedMethod2MethodForMainWorld(args); | 5021 overloadedActivityLoggedMethod2MethodForMainWorld(args); |
| 5022 return; | 5022 return; |
| 5023 } | 5023 } |
| 5024 if (args.Length() < 1) { | 5024 if (UNLIKELY(args.Length() < 1)) { |
| 5025 throwNotEnoughArgumentsError(args.GetIsolate()); | 5025 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 5026 return; | 5026 return; |
| 5027 } | 5027 } |
| 5028 throwTypeError(args.GetIsolate()); | 5028 throwTypeError(args.GetIsolate()); |
| 5029 } | 5029 } |
| 5030 | 5030 |
| 5031 static void overloadedActivityLoggedMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& args) | 5031 static void overloadedActivityLoggedMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& args) |
| 5032 { | 5032 { |
| 5033 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5033 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5034 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); | 5034 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge
tCurrentContext()); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5078 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& args) | 5078 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& args) |
| 5079 { | 5079 { |
| 5080 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5080 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5081 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Sta
ticMethod); | 5081 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter::Sta
ticMethod); |
| 5082 TestObjV8Internal::deprecatedStaticMethodMethod(args); | 5082 TestObjV8Internal::deprecatedStaticMethodMethod(args); |
| 5083 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 5083 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 5084 } | 5084 } |
| 5085 | 5085 |
| 5086 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) | 5086 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 5087 { | 5087 { |
| 5088 if (args.Length() < 1) { | 5088 if (UNLIKELY(args.Length() < 1)) { |
| 5089 throwNotEnoughArgumentsError(args.GetIsolate()); | 5089 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 5090 return; | 5090 return; |
| 5091 } | 5091 } |
| 5092 if (args.Length() <= 0 || !args[0]->IsFunction()) { | 5092 if (args.Length() <= 0 || !args[0]->IsFunction()) { |
| 5093 throwTypeError(args.GetIsolate()); | 5093 throwTypeError(args.GetIsolate()); |
| 5094 return; | 5094 return; |
| 5095 } | 5095 } |
| 5096 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[0], getScrip
tExecutionContext()); | 5096 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[0], getScrip
tExecutionContext()); |
| 5097 | 5097 |
| 5098 RefPtr<TestObj> impl = TestObj::create(testCallback); | 5098 RefPtr<TestObj> impl = TestObj::create(testCallback); |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5556 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); | 5556 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); |
| 5557 return wrapper; | 5557 return wrapper; |
| 5558 } | 5558 } |
| 5559 | 5559 |
| 5560 void V8TestObject::derefObject(void* object) | 5560 void V8TestObject::derefObject(void* object) |
| 5561 { | 5561 { |
| 5562 fromInternalPointer(object)->deref(); | 5562 fromInternalPointer(object)->deref(); |
| 5563 } | 5563 } |
| 5564 | 5564 |
| 5565 } // namespace WebCore | 5565 } // namespace WebCore |
| OLD | NEW |