| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 class ScriptWrappable; | 58 class ScriptWrappable; |
| 59 class XPathNSResolver; | 59 class XPathNSResolver; |
| 60 | 60 |
| 61 namespace TraceEvent { | 61 namespace TraceEvent { |
| 62 class ConvertableToTraceFormat; | 62 class ConvertableToTraceFormat; |
| 63 } | 63 } |
| 64 | 64 |
| 65 const int kMaxRecursionDepth = 22; | 65 const int kMaxRecursionDepth = 22; |
| 66 | 66 |
| 67 // Helpers for throwing JavaScript TypeErrors for arity mismatches. | 67 // Helpers for throwing JavaScript TypeErrors for arity mismatches. |
| 68 void throwArityTypeErrorForMethod(const char* method, const char* type, const ch
ar* valid, unsigned provided, v8::Isolate*); | 68 void setArityTypeError(ExceptionState&, const char* valid, unsigned provided); |
| 69 void throwArityTypeErrorForConstructor(const char* type, const char* valid, unsi
gned provided, v8::Isolate*); | 69 v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(const char* method, co
nst char* type, unsigned expected, unsigned providedLeastNumMandatoryParams, v8:
:Isolate*); |
| 70 void throwArityTypeError(ExceptionState&, const char* valid, unsigned provided); | 70 v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(const char* type,
unsigned expected, unsigned providedLeastNumMandatoryParams, v8::Isolate*); |
| 71 void throwMinimumArityTypeErrorForMethod(const char* method, const char* type, u
nsigned expected, unsigned providedLeastNumMandatoryParams, v8::Isolate*); | 71 void setMinimumArityTypeError(ExceptionState&, unsigned expected, unsigned provi
dedLeastNumMandatoryParams); |
| 72 void throwMinimumArityTypeErrorForConstructor(const char* type, unsigned expecte
d, unsigned providedLeastNumMandatoryParams, v8::Isolate*); | |
| 73 void throwMinimumArityTypeError(ExceptionState&, unsigned expected, unsigned pro
videdLeastNumMandatoryParams); | |
| 74 | 72 |
| 75 v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator(); | 73 v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator(); |
| 76 | 74 |
| 77 template<typename CallbackInfo, typename V> | 75 template<typename CallbackInfo, typename V> |
| 78 inline void v8SetReturnValue(const CallbackInfo& info, V v) | 76 inline void v8SetReturnValue(const CallbackInfo& info, V v) |
| 79 { | 77 { |
| 80 info.GetReturnValue().Set(v); | 78 info.GetReturnValue().Set(v); |
| 81 } | 79 } |
| 82 | 80 |
| 83 template<typename CallbackInfo> | 81 template<typename CallbackInfo> |
| (...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 m_block.ReThrow(); | 956 m_block.ReThrow(); |
| 959 } | 957 } |
| 960 | 958 |
| 961 private: | 959 private: |
| 962 v8::TryCatch& m_block; | 960 v8::TryCatch& m_block; |
| 963 }; | 961 }; |
| 964 | 962 |
| 965 } // namespace blink | 963 } // namespace blink |
| 966 | 964 |
| 967 #endif // V8Binding_h | 965 #endif // V8Binding_h |
| OLD | NEW |