| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Schedule a JavaScript error to be thrown. | 66 // Schedule a JavaScript error to be thrown. |
| 67 v8::Handle<v8::Value> throwError(V8ErrorType, const String&, v8::Isolate*); | 67 v8::Handle<v8::Value> throwError(V8ErrorType, const String&, v8::Isolate*); |
| 68 | 68 |
| 69 // Schedule a JavaScript error to be thrown. | 69 // Schedule a JavaScript error to be thrown. |
| 70 v8::Handle<v8::Value> throwError(v8::Handle<v8::Value>, v8::Isolate*); | 70 v8::Handle<v8::Value> throwError(v8::Handle<v8::Value>, v8::Isolate*); |
| 71 | 71 |
| 72 // A helper for throwing JavaScript TypeError. | 72 // A helper for throwing JavaScript TypeError. |
| 73 v8::Handle<v8::Value> throwTypeError(const String&, v8::Isolate*); | 73 v8::Handle<v8::Value> throwTypeError(const String&, v8::Isolate*); |
| 74 | 74 |
| 75 // Helpers for throwing JavaScript TypeErrors for arity mismatches. | 75 // Helpers for throwing JavaScript TypeErrors for arity mismatches. |
| 76 void throwArityTypeErrorForMethod(const char* method, const char* type, unsigned
expected, unsigned providedLeastNumMandatoryParams, v8::Isolate*); | 76 void throwArityTypeErrorForMethod(const char* method, const char* type, const ch
ar* valid, unsigned provided, v8::Isolate*); |
| 77 void throwArityTypeErrorForConstructor(const char* type, unsigned expected, unsi
gned providedLeastNumMandatoryParams, v8::Isolate*); | 77 void throwArityTypeErrorForConstructor(const char* type, const char* valid, unsi
gned provided, v8::Isolate*); |
| 78 void throwArityTypeError(ExceptionState&, unsigned expected, unsigned providedLe
astNumMandatoryParams); | 78 void throwArityTypeError(ExceptionState&, const char* valid, unsigned provided); |
| 79 void throwMinimumArityTypeErrorForMethod(const char* method, const char* type, u
nsigned expected, unsigned providedLeastNumMandatoryParams, v8::Isolate*); |
| 80 void throwMinimumArityTypeErrorForConstructor(const char* type, unsigned expecte
d, unsigned providedLeastNumMandatoryParams, v8::Isolate*); |
| 81 void throwMinimumArityTypeError(ExceptionState&, unsigned expected, unsigned pro
videdLeastNumMandatoryParams); |
| 79 | 82 |
| 80 v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator(); | 83 v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator(); |
| 81 | 84 |
| 82 inline v8::Handle<v8::Value> argumentOrNull(const v8::FunctionCallbackInfo<v8::V
alue>& info, int index) | 85 inline v8::Handle<v8::Value> argumentOrNull(const v8::FunctionCallbackInfo<v8::V
alue>& info, int index) |
| 83 { | 86 { |
| 84 return index >= info.Length() ? v8::Local<v8::Value>() : info[index]; | 87 return index >= info.Length() ? v8::Local<v8::Value>() : info[index]; |
| 85 } | 88 } |
| 86 | 89 |
| 87 template<typename CallbackInfo, typename V> | 90 template<typename CallbackInfo, typename V> |
| 88 inline void v8SetReturnValue(const CallbackInfo& info, V v) | 91 inline void v8SetReturnValue(const CallbackInfo& info, V v) |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 RefPtr<ScriptState> m_scriptState; | 944 RefPtr<ScriptState> m_scriptState; |
| 942 }; | 945 }; |
| 943 | 946 |
| 944 void GetDevToolsFunctionInfo(v8::Handle<v8::Function>, v8::Isolate*, int& script
Id, String& resourceName, int& lineNumber); | 947 void GetDevToolsFunctionInfo(v8::Handle<v8::Function>, v8::Isolate*, int& script
Id, String& resourceName, int& lineNumber); |
| 945 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio
nContext*, v8::Handle<v8::Function>, v8::Isolate*); | 948 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio
nContext*, v8::Handle<v8::Function>, v8::Isolate*); |
| 946 | 949 |
| 947 | 950 |
| 948 } // namespace WebCore | 951 } // namespace WebCore |
| 949 | 952 |
| 950 #endif // V8Binding_h | 953 #endif // V8Binding_h |
| OLD | NEW |