| 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 27 matching lines...) Expand all Loading... |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 using namespace WTF; | 40 using namespace WTF; |
| 41 | 41 |
| 42 V8ArrayBufferDeallocationObserver* V8ArrayBufferDeallocationObserver::instance() | 42 V8ArrayBufferDeallocationObserver* V8ArrayBufferDeallocationObserver::instance() |
| 43 { | 43 { |
| 44 DEFINE_STATIC_LOCAL(V8ArrayBufferDeallocationObserver, deallocationObserver,
()); | 44 DEFINE_STATIC_LOCAL(V8ArrayBufferDeallocationObserver, deallocationObserver,
()); |
| 45 return &deallocationObserver; | 45 return &deallocationObserver; |
| 46 } | 46 } |
| 47 | 47 |
| 48 WrapperTypeInfo V8ArrayBuffer::wrapperTypeInfo = { | 48 const WrapperTypeInfo V8ArrayBuffer::wrapperTypeInfo = { |
| 49 0, V8ArrayBuffer::derefObject, | 49 0, V8ArrayBuffer::derefObject, |
| 50 0, 0, 0, 0, 0, WrapperTypeObjectPrototype | 50 0, 0, 0, 0, 0, WrapperTypeObjectPrototype |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 bool V8ArrayBuffer::HasInstance(v8::Handle<v8::Value> value, v8::Isolate*, Wrapp
erWorldType) | 53 bool V8ArrayBuffer::HasInstance(v8::Handle<v8::Value> value, v8::Isolate*, Wrapp
erWorldType) |
| 54 { | 54 { |
| 55 return value->IsArrayBuffer(); | 55 return value->IsArrayBuffer(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 bool V8ArrayBuffer::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isola
te*) | 58 bool V8ArrayBuffer::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isola
te*) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 V8ArrayBufferDeallocationObserver::instance()); | 92 V8ArrayBufferDeallocationObserver::instance()); |
| 93 RefPtr<ArrayBuffer> buffer = ArrayBuffer::create(contents); | 93 RefPtr<ArrayBuffer> buffer = ArrayBuffer::create(contents); |
| 94 V8DOMWrapper::associateObjectWithWrapper<V8ArrayBuffer>(buffer.release(), &w
rapperTypeInfo, object, v8::Isolate::GetCurrent(), WrapperConfiguration::Depende
nt); | 94 V8DOMWrapper::associateObjectWithWrapper<V8ArrayBuffer>(buffer.release(), &w
rapperTypeInfo, object, v8::Isolate::GetCurrent(), WrapperConfiguration::Depende
nt); |
| 95 | 95 |
| 96 arraybufferPtr = object->GetAlignedPointerFromInternalField(v8DOMWrapperObje
ctIndex); | 96 arraybufferPtr = object->GetAlignedPointerFromInternalField(v8DOMWrapperObje
ctIndex); |
| 97 ASSERT(arraybufferPtr); | 97 ASSERT(arraybufferPtr); |
| 98 return reinterpret_cast<ArrayBuffer*>(arraybufferPtr); | 98 return reinterpret_cast<ArrayBuffer*>(arraybufferPtr); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace WebCore | 101 } // namespace WebCore |
| OLD | NEW |