| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 79 void throwMinimumArityTypeErrorForMethod(const char* method, const char* type, u
      nsigned expected, unsigned providedLeastNumMandatoryParams, v8::Isolate*); | 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*); | 80 void throwMinimumArityTypeErrorForConstructor(const char* type, unsigned expecte
      d, unsigned providedLeastNumMandatoryParams, v8::Isolate*); | 
| 81 void throwMinimumArityTypeError(ExceptionState&, unsigned expected, unsigned pro
      videdLeastNumMandatoryParams); | 81 void throwMinimumArityTypeError(ExceptionState&, unsigned expected, unsigned pro
      videdLeastNumMandatoryParams); | 
| 82 | 82 | 
| 83 // Returns false if the callback threw an exception, true otherwise. | 83 // Returns false if the callback threw an exception, true otherwise. | 
| 84 bool invokeCallback(ScriptState*, v8::Local<v8::Function> callback, int argc, v8
      ::Handle<v8::Value> argv[]); | 84 bool invokeCallback(ScriptState*, v8::Local<v8::Function> callback, int argc, v8
      ::Handle<v8::Value> argv[]); | 
| 85 bool invokeCallback(ScriptState*, v8::Local<v8::Function> callback, v8::Handle<v
      8::Value> thisValue, int argc, v8::Handle<v8::Value> argv[]); | 85 bool invokeCallback(ScriptState*, v8::Local<v8::Function> callback, v8::Handle<v
      8::Value> thisValue, int argc, v8::Handle<v8::Value> argv[]); | 
| 86 | 86 | 
| 87 v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator(); | 87 v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator(); | 
| 88 | 88 | 
| 89 inline v8::Handle<v8::Value> argumentOrNull(const v8::FunctionCallbackInfo<v8::V
      alue>& info, int index) |  | 
| 90 { |  | 
| 91     return index >= info.Length() ? v8::Local<v8::Value>() : info[index]; |  | 
| 92 } |  | 
| 93 |  | 
| 94 template<typename CallbackInfo, typename V> | 89 template<typename CallbackInfo, typename V> | 
| 95 inline void v8SetReturnValue(const CallbackInfo& info, V v) | 90 inline void v8SetReturnValue(const CallbackInfo& info, V v) | 
| 96 { | 91 { | 
| 97     info.GetReturnValue().Set(v); | 92     info.GetReturnValue().Set(v); | 
| 98 } | 93 } | 
| 99 | 94 | 
| 100 template<typename CallbackInfo> | 95 template<typename CallbackInfo> | 
| 101 inline void v8SetReturnValueBool(const CallbackInfo& info, bool v) | 96 inline void v8SetReturnValueBool(const CallbackInfo& info, bool v) | 
| 102 { | 97 { | 
| 103     info.GetReturnValue().Set(v); | 98     info.GetReturnValue().Set(v); | 
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1003         m_block.Reset(); | 998         m_block.Reset(); | 
| 1004     } | 999     } | 
| 1005 | 1000 | 
| 1006 private: | 1001 private: | 
| 1007     v8::TryCatch& m_block; | 1002     v8::TryCatch& m_block; | 
| 1008 }; | 1003 }; | 
| 1009 | 1004 | 
| 1010 } // namespace WebCore | 1005 } // namespace WebCore | 
| 1011 | 1006 | 
| 1012 #endif // V8Binding_h | 1007 #endif // V8Binding_h | 
| OLD | NEW | 
|---|