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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 STATIC_ONLY(V8TypeOf); | 74 STATIC_ONLY(V8TypeOf); |
75 // |Type| provides C++ -> V8 type conversion for DOM wrappers. | 75 // |Type| provides C++ -> V8 type conversion for DOM wrappers. |
76 // The Blink binding code generator will generate specialized version of | 76 // The Blink binding code generator will generate specialized version of |
77 // V8TypeOf for each wrapper class. | 77 // V8TypeOf for each wrapper class. |
78 typedef void Type; | 78 typedef void Type; |
79 }; | 79 }; |
80 | 80 |
81 // Helpers for throwing JavaScript TypeErrors for arity mismatches. | 81 // Helpers for throwing JavaScript TypeErrors for arity mismatches. |
82 CORE_EXPORT void setArityTypeError(ExceptionState&, const char* valid, unsigned
provided); | 82 CORE_EXPORT void setArityTypeError(ExceptionState&, const char* valid, unsigned
provided); |
83 CORE_EXPORT v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(v8::Isolat
e*, const char* method, const char* type, unsigned expected, unsigned provided); | 83 CORE_EXPORT v8::Local<v8::Value> createMinimumArityTypeErrorForMethod(v8::Isolat
e*, const char* method, const char* type, unsigned expected, unsigned provided); |
84 v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(v8::Isolate*, con
st char* type, unsigned expected, unsigned provided); | 84 CORE_EXPORT v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(v8::I
solate*, const char* type, unsigned expected, unsigned provided); |
85 CORE_EXPORT void setMinimumArityTypeError(ExceptionState&, unsigned expected, un
signed provided); | 85 CORE_EXPORT void setMinimumArityTypeError(ExceptionState&, unsigned expected, un
signed provided); |
86 | 86 |
87 template<typename CallbackInfo, typename S> | 87 template<typename CallbackInfo, typename S> |
88 inline void v8SetReturnValue(const CallbackInfo& info, const v8::Persistent<S>&
handle) | 88 inline void v8SetReturnValue(const CallbackInfo& info, const v8::Persistent<S>&
handle) |
89 { | 89 { |
90 info.GetReturnValue().Set(handle); | 90 info.GetReturnValue().Set(handle); |
91 } | 91 } |
92 | 92 |
93 template<typename CallbackInfo, typename S> | 93 template<typename CallbackInfo, typename S> |
94 inline void v8SetReturnValue(const CallbackInfo& info, const v8::Local<S> handle
) | 94 inline void v8SetReturnValue(const CallbackInfo& info, const v8::Local<S> handle
) |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 typedef void (*InstallTemplateFunction)(v8::Isolate*, const DOMWrapperWorld&, v8
::Local<v8::FunctionTemplate> interfaceTemplate); | 937 typedef void (*InstallTemplateFunction)(v8::Isolate*, const DOMWrapperWorld&, v8
::Local<v8::FunctionTemplate> interfaceTemplate); |
938 | 938 |
939 // Freeze a V8 object. The type of the first parameter and the return value is | 939 // Freeze a V8 object. The type of the first parameter and the return value is |
940 // intentionally v8::Value so that this function can wrap toV8(). | 940 // intentionally v8::Value so that this function can wrap toV8(). |
941 // If the argument isn't an object, this will crash. | 941 // If the argument isn't an object, this will crash. |
942 v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, v8::Isolate*); | 942 v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, v8::Isolate*); |
943 | 943 |
944 } // namespace blink | 944 } // namespace blink |
945 | 945 |
946 #endif // V8Binding_h | 946 #endif // V8Binding_h |
OLD | NEW |