| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 | 42 |
| 43 template<typename T> | 43 template<typename T> |
| 44 class TypedArrayTraits | 44 class TypedArrayTraits |
| 45 { }; | 45 { }; |
| 46 | 46 |
| 47 template<typename TypedArray> | 47 template<typename TypedArray> |
| 48 class V8TypedArray { | 48 class V8TypedArray { |
| 49 public: | 49 public: |
| 50 static bool hasInstance(v8::Handle<v8::Value> value, v8::Isolate*, WrapperWo
rldType) | 50 static bool hasInstance(v8::Handle<v8::Value> value, v8::Isolate*) |
| 51 { | 51 { |
| 52 return TypedArrayTraits<TypedArray>::IsInstance(value); | 52 return TypedArrayTraits<TypedArray>::IsInstance(value); |
| 53 } | 53 } |
| 54 | |
| 55 static bool hasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolate*) | |
| 56 { | |
| 57 return TypedArrayTraits<TypedArray>::IsInstance(value); | |
| 58 } | |
| 59 | 54 |
| 60 static TypedArray* toNative(v8::Handle<v8::Object>); | 55 static TypedArray* toNative(v8::Handle<v8::Object>); |
| 61 static void derefObject(void*); | 56 static void derefObject(void*); |
| 62 static const WrapperTypeInfo wrapperTypeInfo; | 57 static const WrapperTypeInfo wrapperTypeInfo; |
| 63 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount; | 58 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount; |
| 64 | 59 |
| 65 static v8::Handle<v8::Object> wrap(TypedArray* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 60 static v8::Handle<v8::Object> wrap(TypedArray* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
| 66 { | 61 { |
| 67 ASSERT(impl); | 62 ASSERT(impl); |
| 68 ASSERT(!DOMDataStore::containsWrapper<Binding>(impl, isolate)); | 63 ASSERT(!DOMDataStore::containsWrapper<Binding>(impl, isolate)); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 template <typename TypedArray> | 180 template <typename TypedArray> |
| 186 void V8TypedArray<TypedArray>::derefObject(void* object) | 181 void V8TypedArray<TypedArray>::derefObject(void* object) |
| 187 { | 182 { |
| 188 static_cast<TypedArray*>(object)->deref(); | 183 static_cast<TypedArray*>(object)->deref(); |
| 189 } | 184 } |
| 190 | 185 |
| 191 | 186 |
| 192 } // namespace WebCode | 187 } // namespace WebCode |
| 193 | 188 |
| 194 #endif // V8TypedArrayCustom_h | 189 #endif // V8TypedArrayCustom_h |
| OLD | NEW |