Commit 9a666be4 authored by jl@opera.com's avatar jl@opera.com

Rename parameter providedleastNumMandatoryParams => provided

The name is probably a copy/paste typo originally; the expression used
for the |expected| parameter's value in code_generator_v8.pm originally
was $leastNumMandatoryParams, and this identifier somehow ended up
concatenated to the |provided| parameter's name on the C++ side.

Since then, the strange name has spread a bit, and had been "fixed" into
|providedLeastNumMandatoryParams| in some places along the way.

BUG=

Review URL: https://codereview.chromium.org/466283002

git-svn-id: svn://svn.chromium.org/blink/trunk@180154 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a03dc1eb
...@@ -128,7 +128,7 @@ public: ...@@ -128,7 +128,7 @@ public:
static String notAFiniteNumber(double value, const char* name = "value provided"); static String notAFiniteNumber(double value, const char* name = "value provided");
static String notAFiniteNumber(const Decimal& value, const char* name = "value provided"); static String notAFiniteNumber(const Decimal& value, const char* name = "value provided");
static String notEnoughArguments(unsigned expected, unsigned providedleastNumMandatoryParams); static String notEnoughArguments(unsigned expected, unsigned provided);
static String readOnly(const char* detail = 0); static String readOnly(const char* detail = 0);
......
...@@ -78,19 +78,19 @@ void setArityTypeError(ExceptionState& exceptionState, const char* valid, unsign ...@@ -78,19 +78,19 @@ void setArityTypeError(ExceptionState& exceptionState, const char* valid, unsign
exceptionState.throwTypeError(ExceptionMessages::invalidArity(valid, provided)); exceptionState.throwTypeError(ExceptionMessages::invalidArity(valid, provided));
} }
v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(const char* method, const char* type, unsigned expected, unsigned providedLeastNumMandatoryParams, v8::Isolate* isolate) v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(const char* method, const char* type, unsigned expected, unsigned provided, v8::Isolate* isolate)
{ {
return V8ThrowException::createTypeError(ExceptionMessages::failedToExecute(method, type, ExceptionMessages::notEnoughArguments(expected, providedLeastNumMandatoryParams)), isolate); return V8ThrowException::createTypeError(ExceptionMessages::failedToExecute(method, type, ExceptionMessages::notEnoughArguments(expected, provided)), isolate);
} }
v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(const char* type, unsigned expected, unsigned providedLeastNumMandatoryParams, v8::Isolate* isolate) v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(const char* type, unsigned expected, unsigned provided, v8::Isolate* isolate)
{ {
return V8ThrowException::createTypeError(ExceptionMessages::failedToConstruct(type, ExceptionMessages::notEnoughArguments(expected, providedLeastNumMandatoryParams)), isolate); return V8ThrowException::createTypeError(ExceptionMessages::failedToConstruct(type, ExceptionMessages::notEnoughArguments(expected, provided)), isolate);
} }
void setMinimumArityTypeError(ExceptionState& exceptionState, unsigned expected, unsigned providedLeastNumMandatoryParams) void setMinimumArityTypeError(ExceptionState& exceptionState, unsigned expected, unsigned provided)
{ {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(expected, providedLeastNumMandatoryParams)); exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(expected, provided));
} }
class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
......
...@@ -66,9 +66,9 @@ const int kMaxRecursionDepth = 22; ...@@ -66,9 +66,9 @@ const int kMaxRecursionDepth = 22;
// Helpers for throwing JavaScript TypeErrors for arity mismatches. // Helpers for throwing JavaScript TypeErrors for arity mismatches.
void setArityTypeError(ExceptionState&, const char* valid, unsigned provided); void setArityTypeError(ExceptionState&, const char* valid, unsigned provided);
v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(const char* method, const char* type, unsigned expected, unsigned providedLeastNumMandatoryParams, v8::Isolate*); v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(const char* method, const char* type, unsigned expected, unsigned provided, v8::Isolate*);
v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(const char* type, unsigned expected, unsigned providedLeastNumMandatoryParams, v8::Isolate*); v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(const char* type, unsigned expected, unsigned provided, v8::Isolate*);
void setMinimumArityTypeError(ExceptionState&, unsigned expected, unsigned providedLeastNumMandatoryParams); void setMinimumArityTypeError(ExceptionState&, unsigned expected, unsigned provided);
v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator(); v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment