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

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

Issue 23471005: Use UNLIKELY() macro in generated bindings for minimum argument count checks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 namespace WebCore { 61 namespace WebCore {
62 WrapperTypeInfo V8TestEventTarget::info = { V8TestEventTarget::GetTemplate, V8Te stEventTarget::derefObject, 0, V8TestEventTarget::toEventTarget, 0, V8TestEventT arget::installPerContextPrototypeProperties, &V8EventTarget::info, WrapperTypeOb jectPrototype }; 62 WrapperTypeInfo V8TestEventTarget::info = { V8TestEventTarget::GetTemplate, V8Te stEventTarget::derefObject, 0, V8TestEventTarget::toEventTarget, 0, V8TestEventT arget::installPerContextPrototypeProperties, &V8EventTarget::info, WrapperTypeOb jectPrototype };
63 63
64 namespace TestEventTargetV8Internal { 64 namespace TestEventTargetV8Internal {
65 65
66 template <typename T> void V8_USE(T) { } 66 template <typename T> void V8_USE(T) { }
67 67
68 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 68 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
69 { 69 {
70 if (args.Length() < 1) { 70 if (UNLIKELY(args.Length() < 1)) {
71 throwNotEnoughArgumentsError(args.GetIsolate()); 71 throwNotEnoughArgumentsError(args.GetIsolate());
72 return; 72 return;
73 } 73 }
74 TestEventTarget* imp = V8TestEventTarget::toNative(args.Holder()); 74 TestEventTarget* imp = V8TestEventTarget::toNative(args.Holder());
75 V8TRYCATCH_VOID(unsigned, index, toUInt32(args[0])); 75 V8TRYCATCH_VOID(unsigned, index, toUInt32(args[0]));
76 v8SetReturnValue(args, imp->item(index), args.Holder()); 76 v8SetReturnValue(args, imp->item(index), args.Holder());
77 return; 77 return;
78 } 78 }
79 79
80 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) 80 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
81 { 81 {
82 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 82 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
83 TestEventTargetV8Internal::itemMethod(args); 83 TestEventTargetV8Internal::itemMethod(args);
84 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 84 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
85 } 85 }
86 86
87 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 87 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
88 { 88 {
89 if (args.Length() < 1) { 89 if (UNLIKELY(args.Length() < 1)) {
90 throwNotEnoughArgumentsError(args.GetIsolate()); 90 throwNotEnoughArgumentsError(args.GetIsolate());
91 return; 91 return;
92 } 92 }
93 TestEventTarget* imp = V8TestEventTarget::toNative(args.Holder()); 93 TestEventTarget* imp = V8TestEventTarget::toNative(args.Holder());
94 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, args[0]); 94 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, args[0]);
95 v8SetReturnValue(args, imp->namedItem(name), args.Holder()); 95 v8SetReturnValue(args, imp->namedItem(name), args.Holder());
96 return; 96 return;
97 } 97 }
98 98
99 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 99 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 V8DOMWrapper::associateObjectWithWrapper<V8TestEventTarget>(impl, &info, wra pper, isolate, WrapperConfiguration::Independent); 343 V8DOMWrapper::associateObjectWithWrapper<V8TestEventTarget>(impl, &info, wra pper, isolate, WrapperConfiguration::Independent);
344 return wrapper; 344 return wrapper;
345 } 345 }
346 346
347 void V8TestEventTarget::derefObject(void* object) 347 void V8TestEventTarget::derefObject(void* object)
348 { 348 {
349 fromInternalPointer(object)->deref(); 349 fromInternalPointer(object)->deref();
350 } 350 }
351 351
352 } // namespace WebCore 352 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestCustomAccessors.cpp ('k') | Source/bindings/tests/results/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698