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

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

Issue 50073004: We don't need to pass |creationContext| to v8SetReturnValue family (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2156 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2157 { 2157 {
2158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2159 TestObjV8Internal::perWorldAttributeAttributeSetter(name, jsValue, info); 2159 TestObjV8Internal::perWorldAttributeAttributeSetter(name, jsValue, info);
2160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2161 } 2161 }
2162 2162
2163 static void perWorldAttributeAttributeGetterForMainWorld(v8::Local<v8::String> n ame, const v8::PropertyCallbackInfo<v8::Value>& info) 2163 static void perWorldAttributeAttributeGetterForMainWorld(v8::Local<v8::String> n ame, const v8::PropertyCallbackInfo<v8::Value>& info)
2164 { 2164 {
2165 TestObj* imp = V8TestObject::toNative(info.Holder()); 2165 TestObj* imp = V8TestObject::toNative(info.Holder());
2166 v8SetReturnValueForMainWorld(info, imp->perWorldAttribute(), info.Holder()); 2166 v8SetReturnValueForMainWorld(info, imp->perWorldAttribute());
2167 } 2167 }
2168 2168
2169 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) 2169 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S tring> name, const v8::PropertyCallbackInfo<v8::Value>& info)
2170 { 2170 {
2171 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2171 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2172 TestObjV8Internal::perWorldAttributeAttributeGetterForMainWorld(name, info); 2172 TestObjV8Internal::perWorldAttributeAttributeGetterForMainWorld(name, info);
2173 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2173 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2174 } 2174 }
2175 2175
2176 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::String> n ame, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2176 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::String> n ame, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
2883 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args) 2883 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args)
2884 { 2884 {
2885 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 2885 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2886 TestObjV8Internal::longMethodWithArgsMethod(args); 2886 TestObjV8Internal::longMethodWithArgsMethod(args);
2887 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2887 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2888 } 2888 }
2889 2889
2890 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 2890 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
2891 { 2891 {
2892 TestObj* imp = V8TestObject::toNative(args.Holder()); 2892 TestObj* imp = V8TestObject::toNative(args.Holder());
2893 v8SetReturnValue(args, imp->objMethod(), args.Holder()); 2893 v8SetReturnValue(args, imp->objMethod());
2894 } 2894 }
2895 2895
2896 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 2896 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
2897 { 2897 {
2898 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 2898 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2899 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); 2899 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
2900 TestObjV8Internal::objMethodMethod(args); 2900 TestObjV8Internal::objMethodMethod(args);
2901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2902 } 2902 }
2903 2903
2904 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 2904 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
2905 { 2905 {
2906 if (UNLIKELY(args.Length() < 3)) { 2906 if (UNLIKELY(args.Length() < 3)) {
2907 throwTypeError(ExceptionMessages::failedToExecute("objMethodWithArgs", " TestObject", ExceptionMessages::notEnoughArguments(3, args.Length())), args.GetI solate()); 2907 throwTypeError(ExceptionMessages::failedToExecute("objMethodWithArgs", " TestObject", ExceptionMessages::notEnoughArguments(3, args.Length())), args.GetI solate());
2908 return; 2908 return;
2909 } 2909 }
2910 TestObj* imp = V8TestObject::toNative(args.Holder()); 2910 TestObj* imp = V8TestObject::toNative(args.Holder());
2911 V8TRYCATCH_VOID(int, longArg, toInt32(args[0])); 2911 V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
2912 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); 2912 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]);
2913 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[2])) : 0); 2913 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[2])) : 0);
2914 v8SetReturnValue(args, imp->objMethodWithArgs(longArg, strArg, objArg), args .Holder()); 2914 v8SetReturnValue(args, imp->objMethodWithArgs(longArg, strArg, objArg));
2915 } 2915 }
2916 2916
2917 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args) 2917 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args)
2918 { 2918 {
2919 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 2919 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2920 TestObjV8Internal::objMethodWithArgsMethod(args); 2920 TestObjV8Internal::objMethodWithArgsMethod(args);
2921 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2921 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2922 } 2922 }
2923 2923
2924 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value >& args) 2924 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value >& args)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2986 throwTypeError(ExceptionMessages::failedToExecute("methodThatRequiresAll ArgsAndThrows", "TestObject", ExceptionMessages::notEnoughArguments(2, args.Leng th())), args.GetIsolate()); 2986 throwTypeError(ExceptionMessages::failedToExecute("methodThatRequiresAll ArgsAndThrows", "TestObject", ExceptionMessages::notEnoughArguments(2, args.Leng th())), args.GetIsolate());
2987 return; 2987 return;
2988 } 2988 }
2989 TestObj* imp = V8TestObject::toNative(args.Holder()); 2989 TestObj* imp = V8TestObject::toNative(args.Holder());
2990 ExceptionState es(args.GetIsolate()); 2990 ExceptionState es(args.GetIsolate());
2991 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 2991 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
2992 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[1])) : 0); 2992 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[1])) : 0);
2993 RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, obj Arg, es); 2993 RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, obj Arg, es);
2994 if (es.throwIfNeeded()) 2994 if (es.throwIfNeeded())
2995 return; 2995 return;
2996 v8SetReturnValue(args, result.release(), args.Holder()); 2996 v8SetReturnValue(args, result.release());
2997 } 2997 }
2998 2998
2999 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& args) 2999 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& args)
3000 { 3000 {
3001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3002 TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(args); 3002 TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(args);
3003 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3003 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3004 } 3004 }
3005 3005
3006 static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& arg s) 3006 static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& arg s)
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
3172 if (!currentState) 3172 if (!currentState)
3173 return; 3173 return;
3174 ScriptState& state = *currentState; 3174 ScriptState& state = *currentState;
3175 RefPtr<TestObj> result = imp->withScriptStateObj(&state); 3175 RefPtr<TestObj> result = imp->withScriptStateObj(&state);
3176 if (state.hadException()) { 3176 if (state.hadException()) {
3177 v8::Local<v8::Value> exception = state.exception(); 3177 v8::Local<v8::Value> exception = state.exception();
3178 state.clearException(); 3178 state.clearException();
3179 throwError(exception, args.GetIsolate()); 3179 throwError(exception, args.GetIsolate());
3180 return; 3180 return;
3181 } 3181 }
3182 v8SetReturnValue(args, result.release(), args.Holder()); 3182 v8SetReturnValue(args, result.release());
3183 } 3183 }
3184 3184
3185 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args) 3185 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args)
3186 { 3186 {
3187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3188 TestObjV8Internal::withScriptStateObjMethod(args); 3188 TestObjV8Internal::withScriptStateObjMethod(args);
3189 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3189 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3190 } 3190 }
3191 3191
3192 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8 ::Value>& args) 3192 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8 ::Value>& args)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3225 ScriptState& state = *currentState; 3225 ScriptState& state = *currentState;
3226 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, es); 3226 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, es);
3227 if (es.throwIfNeeded()) 3227 if (es.throwIfNeeded())
3228 return; 3228 return;
3229 if (state.hadException()) { 3229 if (state.hadException()) {
3230 v8::Local<v8::Value> exception = state.exception(); 3230 v8::Local<v8::Value> exception = state.exception();
3231 state.clearException(); 3231 state.clearException();
3232 throwError(exception, args.GetIsolate()); 3232 throwError(exception, args.GetIsolate());
3233 return; 3233 return;
3234 } 3234 }
3235 v8SetReturnValue(args, result.release(), args.Holder()); 3235 v8SetReturnValue(args, result.release());
3236 } 3236 }
3237 3237
3238 static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallback Info<v8::Value>& args) 3238 static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallback Info<v8::Value>& args)
3239 { 3239 {
3240 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3240 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3241 TestObjV8Internal::withScriptStateObjExceptionMethod(args); 3241 TestObjV8Internal::withScriptStateObjExceptionMethod(args);
3242 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3242 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3243 } 3243 }
3244 3244
3245 static void withExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value> & args) 3245 static void withExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value> & args)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 ExecutionContext* scriptContext = getExecutionContext(); 3291 ExecutionContext* scriptContext = getExecutionContext();
3292 RefPtr<TestObj> result = imp->withExecutionContextAndScriptStateObjException (&state, scriptContext, es); 3292 RefPtr<TestObj> result = imp->withExecutionContextAndScriptStateObjException (&state, scriptContext, es);
3293 if (es.throwIfNeeded()) 3293 if (es.throwIfNeeded())
3294 return; 3294 return;
3295 if (state.hadException()) { 3295 if (state.hadException()) {
3296 v8::Local<v8::Value> exception = state.exception(); 3296 v8::Local<v8::Value> exception = state.exception();
3297 state.clearException(); 3297 state.clearException();
3298 throwError(exception, args.GetIsolate()); 3298 throwError(exception, args.GetIsolate());
3299 return; 3299 return;
3300 } 3300 }
3301 v8SetReturnValue(args, result.release(), args.Holder()); 3301 v8SetReturnValue(args, result.release());
3302 } 3302 }
3303 3303
3304 static void withExecutionContextAndScriptStateObjExceptionMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& args) 3304 static void withExecutionContextAndScriptStateObjExceptionMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& args)
3305 { 3305 {
3306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3307 TestObjV8Internal::withExecutionContextAndScriptStateObjExceptionMethod(args ); 3307 TestObjV8Internal::withExecutionContextAndScriptStateObjExceptionMethod(args );
3308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3309 } 3309 }
3310 3310
3311 static void withExecutionContextAndScriptStateWithSpacesMethod(const v8::Functio nCallbackInfo<v8::Value>& args) 3311 static void withExecutionContextAndScriptStateWithSpacesMethod(const v8::Functio nCallbackInfo<v8::Value>& args)
3312 { 3312 {
3313 TestObj* imp = V8TestObject::toNative(args.Holder()); 3313 TestObj* imp = V8TestObject::toNative(args.Holder());
3314 ScriptState* currentState = ScriptState::current(); 3314 ScriptState* currentState = ScriptState::current();
3315 if (!currentState) 3315 if (!currentState)
3316 return; 3316 return;
3317 ScriptState& state = *currentState; 3317 ScriptState& state = *currentState;
3318 ExecutionContext* scriptContext = getExecutionContext(); 3318 ExecutionContext* scriptContext = getExecutionContext();
3319 RefPtr<TestObj> result = imp->withExecutionContextAndScriptStateWithSpaces(& state, scriptContext); 3319 RefPtr<TestObj> result = imp->withExecutionContextAndScriptStateWithSpaces(& state, scriptContext);
3320 if (state.hadException()) { 3320 if (state.hadException()) {
3321 v8::Local<v8::Value> exception = state.exception(); 3321 v8::Local<v8::Value> exception = state.exception();
3322 state.clearException(); 3322 state.clearException();
3323 throwError(exception, args.GetIsolate()); 3323 throwError(exception, args.GetIsolate());
3324 return; 3324 return;
3325 } 3325 }
3326 v8SetReturnValue(args, result.release(), args.Holder()); 3326 v8SetReturnValue(args, result.release());
3327 } 3327 }
3328 3328
3329 static void withExecutionContextAndScriptStateWithSpacesMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& args) 3329 static void withExecutionContextAndScriptStateWithSpacesMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& args)
3330 { 3330 {
3331 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3331 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3332 TestObjV8Internal::withExecutionContextAndScriptStateWithSpacesMethod(args); 3332 TestObjV8Internal::withExecutionContextAndScriptStateWithSpacesMethod(args);
3333 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3333 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3334 } 3334 }
3335 3335
3336 static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo< v8::Value>& args) 3336 static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo< v8::Value>& args)
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
4186 if (UNLIKELY(args.Length() < 1)) { 4186 if (UNLIKELY(args.Length() < 1)) {
4187 throwTypeError(ExceptionMessages::failedToExecute("domStringListFunction ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate()); 4187 throwTypeError(ExceptionMessages::failedToExecute("domStringListFunction ", "TestObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args. GetIsolate());
4188 return; 4188 return;
4189 } 4189 }
4190 TestObj* imp = V8TestObject::toNative(args.Holder()); 4190 TestObj* imp = V8TestObject::toNative(args.Holder());
4191 ExceptionState es(args.GetIsolate()); 4191 ExceptionState es(args.GetIsolate());
4192 V8TRYCATCH_VOID(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args .GetIsolate())); 4192 V8TRYCATCH_VOID(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args .GetIsolate()));
4193 RefPtr<DOMStringList> result = imp->domStringListFunction(values, es); 4193 RefPtr<DOMStringList> result = imp->domStringListFunction(values, es);
4194 if (es.throwIfNeeded()) 4194 if (es.throwIfNeeded())
4195 return; 4195 return;
4196 v8SetReturnValue(args, result.release(), args.Holder()); 4196 v8SetReturnValue(args, result.release());
4197 } 4197 }
4198 4198
4199 static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args) 4199 static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args)
4200 { 4200 {
4201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4202 TestObjV8Internal::domStringListFunctionMethod(args); 4202 TestObjV8Internal::domStringListFunctionMethod(args);
4203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4204 } 4204 }
4205 4205
4206 static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& args ) 4206 static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& args )
4207 { 4207 {
4208 TestObj* imp = V8TestObject::toNative(args.Holder()); 4208 TestObj* imp = V8TestObject::toNative(args.Holder());
4209 ExceptionState es(args.GetIsolate()); 4209 ExceptionState es(args.GetIsolate());
4210 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(es), es)) { 4210 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(es), es)) {
4211 v8SetReturnValueNull(args); 4211 v8SetReturnValueNull(args);
4212 es.throwIfNeeded(); 4212 es.throwIfNeeded();
4213 return; 4213 return;
4214 } 4214 }
4215 RefPtr<SVGDocument> result = imp->getSVGDocument(es); 4215 RefPtr<SVGDocument> result = imp->getSVGDocument(es);
4216 if (es.throwIfNeeded()) 4216 if (es.throwIfNeeded())
4217 return; 4217 return;
4218 v8SetReturnValue(args, result.release(), args.Holder()); 4218 v8SetReturnValue(args, result.release());
4219 } 4219 }
4220 4220
4221 static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args) 4221 static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args)
4222 { 4222 {
4223 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4223 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4224 TestObjV8Internal::getSVGDocumentMethod(args); 4224 TestObjV8Internal::getSVGDocumentMethod(args);
4225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4226 } 4226 }
4227 4227
4228 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& args) 4228 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
4293 static void convert5MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar gs) 4293 static void convert5MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& ar gs)
4294 { 4294 {
4295 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4295 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4296 TestObjV8Internal::convert5Method(args); 4296 TestObjV8Internal::convert5Method(args);
4297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4298 } 4298 }
4299 4299
4300 static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value> & args) 4300 static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value> & args)
4301 { 4301 {
4302 TestObj* imp = V8TestObject::toNative(args.Holder()); 4302 TestObj* imp = V8TestObject::toNative(args.Holder());
4303 v8SetReturnValue(args, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >mutablePointFunction())), args.Holder()); 4303 v8SetReturnValue(args, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >mutablePointFunction())));
4304 } 4304 }
4305 4305
4306 static void mutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args) 4306 static void mutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args)
4307 { 4307 {
4308 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4308 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4309 TestObjV8Internal::mutablePointFunctionMethod(args); 4309 TestObjV8Internal::mutablePointFunctionMethod(args);
4310 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4310 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4311 } 4311 }
4312 4312
4313 static void immutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Valu e>& args) 4313 static void immutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Valu e>& args)
4314 { 4314 {
4315 TestObj* imp = V8TestObject::toNative(args.Holder()); 4315 TestObj* imp = V8TestObject::toNative(args.Holder());
4316 v8SetReturnValue(args, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >immutablePointFunction())), args.Holder()); 4316 v8SetReturnValue(args, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >immutablePointFunction())));
4317 } 4317 }
4318 4318
4319 static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& args) 4319 static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& args)
4320 { 4320 {
4321 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4321 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4322 TestObjV8Internal::immutablePointFunctionMethod(args); 4322 TestObjV8Internal::immutablePointFunctionMethod(args);
4323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4324 } 4324 }
4325 4325
4326 static void svgPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args ) 4326 static void svgPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args )
4327 { 4327 {
4328 if (UNLIKELY(args.Length() < 2)) { 4328 if (UNLIKELY(args.Length() < 2)) {
4329 throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "Tes tObject", ExceptionMessages::notEnoughArguments(2, args.Length())), args.GetIsol ate()); 4329 throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "Tes tObject", ExceptionMessages::notEnoughArguments(2, args.Length())), args.GetIsol ate());
4330 return; 4330 return;
4331 } 4331 }
4332 TestObj* imp = V8TestObject::toNative(args.Holder()); 4332 TestObj* imp = V8TestObject::toNative(args.Holder());
4333 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::Has Instance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0); 4333 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::Has Instance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
4334 V8TRYCATCH_VOID(unsigned, index, toUInt32(args[1])); 4334 V8TRYCATCH_VOID(unsigned, index, toUInt32(args[1]));
4335 if (!item) { 4335 if (!item) {
4336 throwUninformativeAndGenericTypeError(args.GetIsolate()); 4336 throwUninformativeAndGenericTypeError(args.GetIsolate());
4337 return; 4337 return;
4338 } 4338 }
4339 v8SetReturnValue(args, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >svgPointMethod(item->propertyReference(), index))), args.Holder()); 4339 v8SetReturnValue(args, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >svgPointMethod(item->propertyReference(), index))));
4340 } 4340 }
4341 4341
4342 static void svgPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args) 4342 static void svgPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args)
4343 { 4343 {
4344 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4344 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4345 TestObjV8Internal::svgPointMethodMethod(args); 4345 TestObjV8Internal::svgPointMethodMethod(args);
4346 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4346 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4347 } 4347 }
4348 4348
4349 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & args) 4349 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & args)
(...skipping 10 matching lines...) Expand all
4360 } 4360 }
4361 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::Has Instance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0); 4361 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::Has Instance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
4362 V8TRYCATCH_VOID(unsigned, index, toUInt32(args[1])); 4362 V8TRYCATCH_VOID(unsigned, index, toUInt32(args[1]));
4363 if (!item) { 4363 if (!item) {
4364 throwUninformativeAndGenericTypeError(args.GetIsolate()); 4364 throwUninformativeAndGenericTypeError(args.GetIsolate());
4365 return; 4365 return;
4366 } 4366 }
4367 SVGPoint result = imp->strictSVGPointMethod(item->propertyReference(), index , es); 4367 SVGPoint result = imp->strictSVGPointMethod(item->propertyReference(), index , es);
4368 if (es.throwIfNeeded()) 4368 if (es.throwIfNeeded())
4369 return; 4369 return;
4370 v8SetReturnValue(args, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(resu lt)), args.Holder()); 4370 v8SetReturnValue(args, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(resu lt)));
4371 } 4371 }
4372 4372
4373 static void strictSVGPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args) 4373 static void strictSVGPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& args)
4374 { 4374 {
4375 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4375 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4376 TestObjV8Internal::strictSVGPointMethodMethod(args); 4376 TestObjV8Internal::strictSVGPointMethodMethod(args);
4377 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4377 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4378 } 4378 }
4379 4379
4380 static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 4380 static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
5351 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInf o, wrapper, isolate, WrapperConfiguration::Independent); 5351 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInf o, wrapper, isolate, WrapperConfiguration::Independent);
5352 return wrapper; 5352 return wrapper;
5353 } 5353 }
5354 5354
5355 void V8TestObject::derefObject(void* object) 5355 void V8TestObject::derefObject(void* object)
5356 { 5356 {
5357 fromInternalPointer(object)->deref(); 5357 fromInternalPointer(object)->deref();
5358 } 5358 }
5359 5359
5360 } // namespace WebCore 5360 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.h ('k') | Source/bindings/tests/results/V8TestObjectPython.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698