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

Unified Diff: Source/bindings/templates/interface.cpp

Issue 113783002: [POSSIBLE PERFORMANCE IMPACT] Remove UNLIKELY from bindings required arguments check (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove FIXME Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index f0d5616708ad20b443fc3dadc23edbe5fba6bb08..f53d7ab137c2576d4be9c8f52c4233e293fd4468 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -138,8 +138,7 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{% if constructor_arguments %}
{# FIXME: support optional arguments #}
{% set number_of_arguments = constructor_arguments|length %}
- {# FIXME: remove this UNLIKELY: constructors are heavy, so no difference. #}
- if (UNLIKELY(info.Length() < {{number_of_arguments}})) {
+ if (info.Length() < {{number_of_arguments}}) {
throwTypeError(ExceptionMessages::failedToExecute("Constructor", "{{interface_name}}", ExceptionMessages::notEnoughArguments({{number_of_arguments}}, info.Length())), info.GetIsolate());
return;
}
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698