OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "bindings/core/v8/ScriptValueSerializer.h" | 5 #include "bindings/core/v8/ScriptValueSerializer.h" |
6 | 6 |
7 #include "bindings/core/v8/Transferables.h" | 7 #include "bindings/core/v8/Transferables.h" |
8 #include "bindings/core/v8/V8ArrayBuffer.h" | 8 #include "bindings/core/v8/V8ArrayBuffer.h" |
9 #include "bindings/core/v8/V8ArrayBufferView.h" | 9 #include "bindings/core/v8/V8ArrayBufferView.h" |
10 #include "bindings/core/v8/V8Blob.h" | 10 #include "bindings/core/v8/V8Blob.h" |
(...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1757 | 1757 |
1758 bool SerializedScriptValueReader::readCompositorProxy(v8::Local<v8::Value>* valu
e) | 1758 bool SerializedScriptValueReader::readCompositorProxy(v8::Local<v8::Value>* valu
e) |
1759 { | 1759 { |
1760 uint32_t attributes; | 1760 uint32_t attributes; |
1761 uint64_t element; | 1761 uint64_t element; |
1762 if (!doReadUint64(&element)) | 1762 if (!doReadUint64(&element)) |
1763 return false; | 1763 return false; |
1764 if (!doReadUint32(&attributes)) | 1764 if (!doReadUint32(&attributes)) |
1765 return false; | 1765 return false; |
1766 | 1766 |
1767 CompositorProxy* compositorProxy = CompositorProxy::create(element, attribut
es); | 1767 CompositorProxy* compositorProxy = CompositorProxy::create(m_scriptState->ge
tExecutionContext(), element, attributes); |
1768 *value = toV8(compositorProxy, m_scriptState->context()->Global(), isolate()
); | 1768 *value = toV8(compositorProxy, m_scriptState->context()->Global(), isolate()
); |
1769 return !value->IsEmpty(); | 1769 return !value->IsEmpty(); |
1770 } | 1770 } |
1771 | 1771 |
1772 DOMArrayBuffer* SerializedScriptValueReader::doReadArrayBuffer() | 1772 DOMArrayBuffer* SerializedScriptValueReader::doReadArrayBuffer() |
1773 { | 1773 { |
1774 uint32_t byteLength; | 1774 uint32_t byteLength; |
1775 if (!doReadUint32(&byteLength)) | 1775 if (!doReadUint32(&byteLength)) |
1776 return nullptr; | 1776 return nullptr; |
1777 if (m_position + byteLength > m_length) | 1777 if (m_position + byteLength > m_length) |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2400 return false; | 2400 return false; |
2401 uint32_t objectReference = m_openCompositeReferenceStack[m_openCompositeRefe
renceStack.size() - 1]; | 2401 uint32_t objectReference = m_openCompositeReferenceStack[m_openCompositeRefe
renceStack.size() - 1]; |
2402 m_openCompositeReferenceStack.shrink(m_openCompositeReferenceStack.size() -
1); | 2402 m_openCompositeReferenceStack.shrink(m_openCompositeReferenceStack.size() -
1); |
2403 if (objectReference >= m_objectPool.size()) | 2403 if (objectReference >= m_objectPool.size()) |
2404 return false; | 2404 return false; |
2405 *object = m_objectPool[objectReference]; | 2405 *object = m_objectPool[objectReference]; |
2406 return true; | 2406 return true; |
2407 } | 2407 } |
2408 | 2408 |
2409 } // namespace blink | 2409 } // namespace blink |
OLD | NEW |