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

Unified Diff: Source/bindings/tests/results/V8TestInterface.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
Index: Source/bindings/tests/results/V8TestInterface.cpp
diff --git a/Source/bindings/tests/results/V8TestInterface.cpp b/Source/bindings/tests/results/V8TestInterface.cpp
index 01227ded2eface0dd4ba0ca60e05f53f34541dad..b7aa309359df7eedbd715616d6a5baf345501257 100644
--- a/Source/bindings/tests/results/V8TestInterface.cpp
+++ b/Source/bindings/tests/results/V8TestInterface.cpp
@@ -555,7 +555,7 @@ static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::V
static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsMethod2", "TestInterface", info.Holder(), info.GetIsolate());
- if (UNLIKELY(info.Length() < 2)) {
+ if (info.Length() < 2) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
exceptionState.throwIfNeeded();
return;
@@ -621,7 +621,7 @@ static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8:
static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementalMethod2", "TestInterface", info.Holder(), info.GetIsolate());
- if (UNLIKELY(info.Length() < 2)) {
+ if (info.Length() < 2) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
exceptionState.throwIfNeeded();
return;
@@ -677,7 +677,7 @@ static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8:
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- if (UNLIKELY(info.Length() < 1)) {
+ if (info.Length() < 1) {
throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestInterface", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
return;
}
« no previous file with comments | « Source/bindings/tests/results/V8TestEventTarget.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698