Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "config.h" 5 #include "config.h"
6 #include "bindings/core/v8/ScriptValueSerializer.h" 6 #include "bindings/core/v8/ScriptValueSerializer.h"
7 7
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 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 1592
1593 bool SerializedScriptValueReader::readCompositorProxy(v8::Local<v8::Value>* valu e) 1593 bool SerializedScriptValueReader::readCompositorProxy(v8::Local<v8::Value>* valu e)
1594 { 1594 {
1595 uint32_t attributes; 1595 uint32_t attributes;
1596 uint64_t element; 1596 uint64_t element;
1597 if (!doReadUint64(&element)) 1597 if (!doReadUint64(&element))
1598 return false; 1598 return false;
1599 if (!doReadUint32(&attributes)) 1599 if (!doReadUint32(&attributes))
1600 return false; 1600 return false;
1601 1601
1602 CompositorProxy* compositorProxy = CompositorProxy::create(element, attribut es); 1602 CompositorProxy* compositorProxy = CompositorProxy::create(m_scriptState->ex ecutionContext(), element, attributes);
1603 *value = toV8(compositorProxy, m_scriptState->context()->Global(), isolate() ); 1603 *value = toV8(compositorProxy, m_scriptState->context()->Global(), isolate() );
1604 return !value->IsEmpty(); 1604 return !value->IsEmpty();
1605 } 1605 }
1606 1606
1607 PassRefPtr<DOMArrayBuffer> SerializedScriptValueReader::doReadArrayBuffer() 1607 PassRefPtr<DOMArrayBuffer> SerializedScriptValueReader::doReadArrayBuffer()
1608 { 1608 {
1609 uint32_t byteLength; 1609 uint32_t byteLength;
1610 if (!doReadUint32(&byteLength)) 1610 if (!doReadUint32(&byteLength))
1611 return nullptr; 1611 return nullptr;
1612 if (m_position + byteLength > m_length) 1612 if (m_position + byteLength > m_length)
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 return false; 2225 return false;
2226 uint32_t objectReference = m_openCompositeReferenceStack[m_openCompositeRefe renceStack.size() - 1]; 2226 uint32_t objectReference = m_openCompositeReferenceStack[m_openCompositeRefe renceStack.size() - 1];
2227 m_openCompositeReferenceStack.shrink(m_openCompositeReferenceStack.size() - 1); 2227 m_openCompositeReferenceStack.shrink(m_openCompositeReferenceStack.size() - 1);
2228 if (objectReference >= m_objectPool.size()) 2228 if (objectReference >= m_objectPool.size())
2229 return false; 2229 return false;
2230 *object = m_objectPool[objectReference]; 2230 *object = m_objectPool[objectReference];
2231 return true; 2231 return true;
2232 } 2232 }
2233 2233
2234 } // namespace blink 2234 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/ManualTests/compositor-worker/sticky/sticky.html ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698