| 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 #ifndef ScriptValueSerializer_h | 5 #ifndef ScriptValueSerializer_h |
| 6 #define ScriptValueSerializer_h | 6 #define ScriptValueSerializer_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/SerializationTag.h" | 8 #include "bindings/core/v8/SerializationTag.h" |
| 9 #include "bindings/core/v8/SerializedScriptValue.h" | 9 #include "bindings/core/v8/SerializedScriptValue.h" |
| 10 #include "bindings/core/v8/V8Binding.h" | 10 #include "bindings/core/v8/V8Binding.h" |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 , m_version(0) | 489 , m_version(0) |
| 490 , m_blobInfo(blobInfo) | 490 , m_blobInfo(blobInfo) |
| 491 , m_blobDataHandles(blobDataHandles) | 491 , m_blobDataHandles(blobDataHandles) |
| 492 { | 492 { |
| 493 ASSERT(!(reinterpret_cast<size_t>(buffer) & 1)); | 493 ASSERT(!(reinterpret_cast<size_t>(buffer) & 1)); |
| 494 ASSERT(length >= 0); | 494 ASSERT(length >= 0); |
| 495 } | 495 } |
| 496 | 496 |
| 497 bool isEof() const { return m_position >= m_length; } | 497 bool isEof() const { return m_position >= m_length; } |
| 498 | 498 |
| 499 ScriptState* scriptState() const { return m_scriptState.get(); } | 499 ScriptState* getScriptState() const { return m_scriptState.get(); } |
| 500 | 500 |
| 501 protected: | 501 protected: |
| 502 v8::Isolate* isolate() const { return m_scriptState->isolate(); } | 502 v8::Isolate* isolate() const { return m_scriptState->isolate(); } |
| 503 v8::Local<v8::Context> context() const { return m_scriptState->context(); } | 503 v8::Local<v8::Context> context() const { return m_scriptState->context(); } |
| 504 unsigned length() const { return m_length; } | 504 unsigned length() const { return m_length; } |
| 505 unsigned position() const { return m_position; } | 505 unsigned position() const { return m_position; } |
| 506 | 506 |
| 507 const uint8_t* allocate(uint32_t size) | 507 const uint8_t* allocate(uint32_t size) |
| 508 { | 508 { |
| 509 const uint8_t* allocated = m_buffer + m_position; | 509 const uint8_t* allocated = m_buffer + m_position; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 ArrayBufferContentsArray* m_arrayBufferContents; | 641 ArrayBufferContentsArray* m_arrayBufferContents; |
| 642 ImageBitmapContentsArray* m_imageBitmapContents; | 642 ImageBitmapContentsArray* m_imageBitmapContents; |
| 643 Vector<v8::Local<v8::Value>> m_arrayBuffers; | 643 Vector<v8::Local<v8::Value>> m_arrayBuffers; |
| 644 Vector<v8::Local<v8::Value>> m_imageBitmaps; | 644 Vector<v8::Local<v8::Value>> m_imageBitmaps; |
| 645 uint32_t m_version; | 645 uint32_t m_version; |
| 646 }; | 646 }; |
| 647 | 647 |
| 648 } // namespace blink | 648 } // namespace blink |
| 649 | 649 |
| 650 #endif // ScriptValueSerializer_h | 650 #endif // ScriptValueSerializer_h |
| OLD | NEW |