| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 ExceptionState&); | 116 ExceptionState&); |
| 117 | 117 |
| 118 // Helper function which pulls ArrayBufferContents out of an ArrayBufferArray | 118 // Helper function which pulls ArrayBufferContents out of an ArrayBufferArray |
| 119 // and neuters the ArrayBufferArray. Returns nullptr if there is an | 119 // and neuters the ArrayBufferArray. Returns nullptr if there is an |
| 120 // exception. | 120 // exception. |
| 121 static std::unique_ptr<ArrayBufferContentsArray> transferArrayBufferContents( | 121 static std::unique_ptr<ArrayBufferContentsArray> transferArrayBufferContents( |
| 122 v8::Isolate*, | 122 v8::Isolate*, |
| 123 const ArrayBufferArray&, | 123 const ArrayBufferArray&, |
| 124 ExceptionState&); | 124 ExceptionState&); |
| 125 | 125 |
| 126 static std::unique_ptr<ImageBitmapContentsArray> transferImageBitmapContents( |
| 127 v8::Isolate*, |
| 128 const ImageBitmapArray&, |
| 129 ExceptionState&); |
| 130 |
| 126 // Informs the V8 about external memory allocated and owned by this object. | 131 // Informs the V8 about external memory allocated and owned by this object. |
| 127 // Large values should contribute to GC counters to eventually trigger a GC, | 132 // Large values should contribute to GC counters to eventually trigger a GC, |
| 128 // otherwise flood of postMessage() can cause OOM. | 133 // otherwise flood of postMessage() can cause OOM. |
| 129 // Ok to invoke multiple times (only adds memory once). | 134 // Ok to invoke multiple times (only adds memory once). |
| 130 // The memory registration is revoked automatically in destructor. | 135 // The memory registration is revoked automatically in destructor. |
| 131 void registerMemoryAllocatedWithCurrentScriptContext(); | 136 void registerMemoryAllocatedWithCurrentScriptContext(); |
| 132 | 137 |
| 133 // Provides access to the data and its attributes, regardless of whether the | 138 // Provides access to the data and its attributes, regardless of whether the |
| 134 // data was created as a string or as a vector. | 139 // data was created as a string or as a vector. |
| 135 // TODO(jbroman): Remove the 16-bit string representation, and simplify. | 140 // TODO(jbroman): Remove the 16-bit string representation, and simplify. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 211 |
| 207 std::unique_ptr<ArrayBufferContentsArray> m_arrayBufferContentsArray; | 212 std::unique_ptr<ArrayBufferContentsArray> m_arrayBufferContentsArray; |
| 208 std::unique_ptr<ImageBitmapContentsArray> m_imageBitmapContentsArray; | 213 std::unique_ptr<ImageBitmapContentsArray> m_imageBitmapContentsArray; |
| 209 BlobDataHandleMap m_blobDataHandles; | 214 BlobDataHandleMap m_blobDataHandles; |
| 210 intptr_t m_externallyAllocatedMemory; | 215 intptr_t m_externallyAllocatedMemory; |
| 211 }; | 216 }; |
| 212 | 217 |
| 213 } // namespace blink | 218 } // namespace blink |
| 214 | 219 |
| 215 #endif // SerializedScriptValue_h | 220 #endif // SerializedScriptValue_h |
| OLD | NEW |