OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 #include "wtf/unicode/CharacterNames.h" | 71 #include "wtf/unicode/CharacterNames.h" |
72 #include "wtf/unicode/Unicode.h" | 72 #include "wtf/unicode/Unicode.h" |
73 | 73 |
74 namespace blink { | 74 namespace blink { |
75 | 75 |
76 void setArityTypeError(ExceptionState& exceptionState, const char* valid, unsign
ed provided) | 76 void setArityTypeError(ExceptionState& exceptionState, const char* valid, unsign
ed provided) |
77 { | 77 { |
78 exceptionState.throwTypeError(ExceptionMessages::invalidArity(valid, provide
d)); | 78 exceptionState.throwTypeError(ExceptionMessages::invalidArity(valid, provide
d)); |
79 } | 79 } |
80 | 80 |
81 v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(const char* method, co
nst char* type, unsigned expected, unsigned provided, v8::Isolate* isolate) | 81 v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(v8::Isolate* isolate,
const char* method, const char* type, unsigned expected, unsigned provided) |
82 { | 82 { |
83 return V8ThrowException::createTypeError(isolate, ExceptionMessages::failedT
oExecute(method, type, ExceptionMessages::notEnoughArguments(expected, provided)
)); | 83 return V8ThrowException::createTypeError(isolate, ExceptionMessages::failedT
oExecute(method, type, ExceptionMessages::notEnoughArguments(expected, provided)
)); |
84 } | 84 } |
85 | 85 |
86 v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(const char* type,
unsigned expected, unsigned provided, v8::Isolate* isolate) | 86 v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(v8::Isolate* isol
ate, const char* type, unsigned expected, unsigned provided) |
87 { | 87 { |
88 return V8ThrowException::createTypeError(isolate, ExceptionMessages::failedT
oConstruct(type, ExceptionMessages::notEnoughArguments(expected, provided))); | 88 return V8ThrowException::createTypeError(isolate, ExceptionMessages::failedT
oConstruct(type, ExceptionMessages::notEnoughArguments(expected, provided))); |
89 } | 89 } |
90 | 90 |
91 void setMinimumArityTypeError(ExceptionState& exceptionState, unsigned expected,
unsigned provided) | 91 void setMinimumArityTypeError(ExceptionState& exceptionState, unsigned expected,
unsigned provided) |
92 { | 92 { |
93 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(expected
, provided)); | 93 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(expected
, provided)); |
94 } | 94 } |
95 | 95 |
96 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 96 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 | 993 |
994 v8::Local<v8::Value> v8IteratorResult(v8::Isolate* isolate, v8::Handle<v8::Value
> value) | 994 v8::Local<v8::Value> v8IteratorResult(v8::Isolate* isolate, v8::Handle<v8::Value
> value) |
995 { | 995 { |
996 v8::Local<v8::Object> result = v8::Object::New(isolate); | 996 v8::Local<v8::Object> result = v8::Object::New(isolate); |
997 result->Set(v8String(isolate, "value"), value); | 997 result->Set(v8String(isolate, "value"), value); |
998 result->Set(v8String(isolate, "done"), v8Boolean(false, isolate)); | 998 result->Set(v8String(isolate, "done"), v8Boolean(false, isolate)); |
999 return result; | 999 return result; |
1000 } | 1000 } |
1001 | 1001 |
1002 } // namespace blink | 1002 } // namespace blink |
OLD | NEW |