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

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, 11 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 "bindings/core/v8/ScriptValueSerializer.h" 5 #include "bindings/core/v8/ScriptValueSerializer.h"
6 6
7 #include "bindings/core/v8/V8ArrayBuffer.h" 7 #include "bindings/core/v8/V8ArrayBuffer.h"
8 #include "bindings/core/v8/V8ArrayBufferView.h" 8 #include "bindings/core/v8/V8ArrayBufferView.h"
9 #include "bindings/core/v8/V8Blob.h" 9 #include "bindings/core/v8/V8Blob.h"
10 #include "bindings/core/v8/V8CompositorProxy.h" 10 #include "bindings/core/v8/V8CompositorProxy.h"
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 1591
1592 bool SerializedScriptValueReader::readCompositorProxy(v8::Local<v8::Value>* valu e) 1592 bool SerializedScriptValueReader::readCompositorProxy(v8::Local<v8::Value>* valu e)
1593 { 1593 {
1594 uint32_t attributes; 1594 uint32_t attributes;
1595 uint64_t element; 1595 uint64_t element;
1596 if (!doReadUint64(&element)) 1596 if (!doReadUint64(&element))
1597 return false; 1597 return false;
1598 if (!doReadUint32(&attributes)) 1598 if (!doReadUint32(&attributes))
1599 return false; 1599 return false;
1600 1600
1601 CompositorProxy* compositorProxy = CompositorProxy::create(element, attribut es); 1601 CompositorProxy* compositorProxy = CompositorProxy::create(m_scriptState->ex ecutionContext(), element, attributes);
1602 *value = toV8(compositorProxy, m_scriptState->context()->Global(), isolate() ); 1602 *value = toV8(compositorProxy, m_scriptState->context()->Global(), isolate() );
1603 return !value->IsEmpty(); 1603 return !value->IsEmpty();
1604 } 1604 }
1605 1605
1606 PassRefPtr<DOMArrayBuffer> SerializedScriptValueReader::doReadArrayBuffer() 1606 PassRefPtr<DOMArrayBuffer> SerializedScriptValueReader::doReadArrayBuffer()
1607 { 1607 {
1608 uint32_t byteLength; 1608 uint32_t byteLength;
1609 if (!doReadUint32(&byteLength)) 1609 if (!doReadUint32(&byteLength))
1610 return nullptr; 1610 return nullptr;
1611 if (m_position + byteLength > m_length) 1611 if (m_position + byteLength > m_length)
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 return false; 2224 return false;
2225 uint32_t objectReference = m_openCompositeReferenceStack[m_openCompositeRefe renceStack.size() - 1]; 2225 uint32_t objectReference = m_openCompositeReferenceStack[m_openCompositeRefe renceStack.size() - 1];
2226 m_openCompositeReferenceStack.shrink(m_openCompositeReferenceStack.size() - 1); 2226 m_openCompositeReferenceStack.shrink(m_openCompositeReferenceStack.size() - 1);
2227 if (objectReference >= m_objectPool.size()) 2227 if (objectReference >= m_objectPool.size())
2228 return false; 2228 return false;
2229 *object = m_objectPool[objectReference]; 2229 *object = m_objectPool[objectReference];
2230 return true; 2230 return true;
2231 } 2231 }
2232 2232
2233 } // namespace blink 2233 } // 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