| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 DEFINE_STATIC_LOCAL(V8ArrayBufferDeallocationObserver, deallocationObserver,
()); | 44 DEFINE_STATIC_LOCAL(V8ArrayBufferDeallocationObserver, deallocationObserver,
()); |
| 45 return &deallocationObserver; | 45 return &deallocationObserver; |
| 46 } | 46 } |
| 47 | 47 |
| 48 const WrapperTypeInfo V8ArrayBuffer::wrapperTypeInfo = { | 48 const WrapperTypeInfo V8ArrayBuffer::wrapperTypeInfo = { |
| 49 gin::kEmbedderBlink, | 49 gin::kEmbedderBlink, |
| 50 0, V8ArrayBuffer::derefObject, | 50 0, V8ArrayBuffer::derefObject, |
| 51 0, 0, 0, 0, 0, WrapperTypeObjectPrototype | 51 0, 0, 0, 0, 0, WrapperTypeObjectPrototype |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 bool V8ArrayBuffer::hasInstance(v8::Handle<v8::Value> value, v8::Isolate*, Wrapp
erWorldType) | 54 bool V8ArrayBuffer::hasInstance(v8::Handle<v8::Value> value, v8::Isolate*) |
| 55 { | 55 { |
| 56 return value->IsArrayBuffer(); | 56 return value->IsArrayBuffer(); |
| 57 } | 57 } |
| 58 | |
| 59 bool V8ArrayBuffer::hasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isola
te*) | |
| 60 { | |
| 61 return value->IsArrayBuffer(); | |
| 62 } | |
| 63 | 58 |
| 64 void V8ArrayBuffer::derefObject(void* object) | 59 void V8ArrayBuffer::derefObject(void* object) |
| 65 { | 60 { |
| 66 static_cast<ArrayBuffer*>(object)->deref(); | 61 static_cast<ArrayBuffer*>(object)->deref(); |
| 67 } | 62 } |
| 68 | 63 |
| 69 v8::Handle<v8::Object> V8ArrayBuffer::createWrapper(PassRefPtr<ArrayBuffer> impl
, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 64 v8::Handle<v8::Object> V8ArrayBuffer::createWrapper(PassRefPtr<ArrayBuffer> impl
, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 70 { | 65 { |
| 71 ASSERT(impl.get()); | 66 ASSERT(impl.get()); |
| 72 ASSERT(!DOMDataStore::containsWrapper<V8ArrayBuffer>(impl.get(), isolate)); | 67 ASSERT(!DOMDataStore::containsWrapper<V8ArrayBuffer>(impl.get(), isolate)); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 99 return reinterpret_cast<ArrayBuffer*>(arraybufferPtr); | 94 return reinterpret_cast<ArrayBuffer*>(arraybufferPtr); |
| 100 } | 95 } |
| 101 | 96 |
| 102 template<> | 97 template<> |
| 103 v8::Handle<v8::Value> toV8NoInline(ArrayBuffer* impl, v8::Handle<v8::Object> cre
ationContext, v8::Isolate* isolate) | 98 v8::Handle<v8::Value> toV8NoInline(ArrayBuffer* impl, v8::Handle<v8::Object> cre
ationContext, v8::Isolate* isolate) |
| 104 { | 99 { |
| 105 return toV8(impl, creationContext, isolate); | 100 return toV8(impl, creationContext, isolate); |
| 106 } | 101 } |
| 107 | 102 |
| 108 } // namespace WebCore | 103 } // namespace WebCore |
| OLD | NEW |