| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 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 10 matching lines...) Expand all Loading... |
| 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "sky/engine/config.h" |
| 32 #include "bindings/core/v8/SerializedScriptValue.h" | 32 #include "sky/engine/bindings/core/v8/SerializedScriptValue.h" |
| 33 | 33 |
| 34 #include "bindings/core/v8/ExceptionState.h" | |
| 35 #include "bindings/core/v8/V8Binding.h" | |
| 36 #include "bindings/core/v8/V8ImageData.h" | 34 #include "bindings/core/v8/V8ImageData.h" |
| 37 #include "bindings/core/v8/custom/V8ArrayBufferCustom.h" | 35 #include "sky/engine/bindings/core/v8/ExceptionState.h" |
| 38 #include "bindings/core/v8/custom/V8ArrayBufferViewCustom.h" | 36 #include "sky/engine/bindings/core/v8/V8Binding.h" |
| 39 #include "bindings/core/v8/custom/V8DataViewCustom.h" | 37 #include "sky/engine/bindings/core/v8/custom/V8ArrayBufferCustom.h" |
| 40 #include "bindings/core/v8/custom/V8Float32ArrayCustom.h" | 38 #include "sky/engine/bindings/core/v8/custom/V8ArrayBufferViewCustom.h" |
| 41 #include "bindings/core/v8/custom/V8Float64ArrayCustom.h" | 39 #include "sky/engine/bindings/core/v8/custom/V8DataViewCustom.h" |
| 42 #include "bindings/core/v8/custom/V8Int16ArrayCustom.h" | 40 #include "sky/engine/bindings/core/v8/custom/V8Float32ArrayCustom.h" |
| 43 #include "bindings/core/v8/custom/V8Int32ArrayCustom.h" | 41 #include "sky/engine/bindings/core/v8/custom/V8Float64ArrayCustom.h" |
| 44 #include "bindings/core/v8/custom/V8Int8ArrayCustom.h" | 42 #include "sky/engine/bindings/core/v8/custom/V8Int16ArrayCustom.h" |
| 45 #include "bindings/core/v8/custom/V8Uint16ArrayCustom.h" | 43 #include "sky/engine/bindings/core/v8/custom/V8Int32ArrayCustom.h" |
| 46 #include "bindings/core/v8/custom/V8Uint32ArrayCustom.h" | 44 #include "sky/engine/bindings/core/v8/custom/V8Int8ArrayCustom.h" |
| 47 #include "bindings/core/v8/custom/V8Uint8ArrayCustom.h" | 45 #include "sky/engine/bindings/core/v8/custom/V8Uint16ArrayCustom.h" |
| 48 #include "bindings/core/v8/custom/V8Uint8ClampedArrayCustom.h" | 46 #include "sky/engine/bindings/core/v8/custom/V8Uint32ArrayCustom.h" |
| 49 #include "core/dom/ExceptionCode.h" | 47 #include "sky/engine/bindings/core/v8/custom/V8Uint8ArrayCustom.h" |
| 50 #include "core/html/ImageData.h" | 48 #include "sky/engine/bindings/core/v8/custom/V8Uint8ClampedArrayCustom.h" |
| 51 #include "core/html/canvas/DataView.h" | 49 #include "sky/engine/core/dom/ExceptionCode.h" |
| 52 #include "platform/SharedBuffer.h" | 50 #include "sky/engine/core/html/ImageData.h" |
| 53 #include "platform/heap/Handle.h" | 51 #include "sky/engine/core/html/canvas/DataView.h" |
| 54 #include "public/platform/Platform.h" | 52 #include "sky/engine/platform/SharedBuffer.h" |
| 55 #include "wtf/ArrayBuffer.h" | 53 #include "sky/engine/platform/heap/Handle.h" |
| 56 #include "wtf/ArrayBufferContents.h" | 54 #include "sky/engine/public/platform/Platform.h" |
| 57 #include "wtf/ArrayBufferView.h" | 55 #include "sky/engine/wtf/ArrayBuffer.h" |
| 58 #include "wtf/Assertions.h" | 56 #include "sky/engine/wtf/ArrayBufferContents.h" |
| 59 #include "wtf/ByteOrder.h" | 57 #include "sky/engine/wtf/ArrayBufferView.h" |
| 60 #include "wtf/Float32Array.h" | 58 #include "sky/engine/wtf/Assertions.h" |
| 61 #include "wtf/Float64Array.h" | 59 #include "sky/engine/wtf/ByteOrder.h" |
| 62 #include "wtf/Int16Array.h" | 60 #include "sky/engine/wtf/Float32Array.h" |
| 63 #include "wtf/Int32Array.h" | 61 #include "sky/engine/wtf/Float64Array.h" |
| 64 #include "wtf/Int8Array.h" | 62 #include "sky/engine/wtf/Int16Array.h" |
| 65 #include "wtf/RefCounted.h" | 63 #include "sky/engine/wtf/Int32Array.h" |
| 66 #include "wtf/Uint16Array.h" | 64 #include "sky/engine/wtf/Int8Array.h" |
| 67 #include "wtf/Uint32Array.h" | 65 #include "sky/engine/wtf/RefCounted.h" |
| 68 #include "wtf/Uint8Array.h" | 66 #include "sky/engine/wtf/Uint16Array.h" |
| 69 #include "wtf/Uint8ClampedArray.h" | 67 #include "sky/engine/wtf/Uint32Array.h" |
| 70 #include "wtf/Vector.h" | 68 #include "sky/engine/wtf/Uint8Array.h" |
| 71 #include "wtf/text/StringBuffer.h" | 69 #include "sky/engine/wtf/Uint8ClampedArray.h" |
| 72 #include "wtf/text/StringUTF8Adaptor.h" | 70 #include "sky/engine/wtf/Vector.h" |
| 71 #include "sky/engine/wtf/text/StringBuffer.h" |
| 72 #include "sky/engine/wtf/text/StringUTF8Adaptor.h" |
| 73 | 73 |
| 74 // FIXME: consider crashing in debug mode on deserialization errors | 74 // FIXME: consider crashing in debug mode on deserialization errors |
| 75 // NOTE: be sure to change wireFormatVersion as necessary! | 75 // NOTE: be sure to change wireFormatVersion as necessary! |
| 76 | 76 |
| 77 namespace blink { | 77 namespace blink { |
| 78 | 78 |
| 79 namespace { | 79 namespace { |
| 80 | 80 |
| 81 // This code implements the HTML5 Structured Clone algorithm: | 81 // This code implements the HTML5 Structured Clone algorithm: |
| 82 // http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#safe-pa
ssing-of-structured-data | 82 // http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#safe-pa
ssing-of-structured-data |
| (...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2153 // If the allocated memory was not registered before, then this class is lik
ely | 2153 // If the allocated memory was not registered before, then this class is lik
ely |
| 2154 // used in a context other then Worker's onmessage environment and the prese
nce of | 2154 // used in a context other then Worker's onmessage environment and the prese
nce of |
| 2155 // current v8 context is not guaranteed. Avoid calling v8 then. | 2155 // current v8 context is not guaranteed. Avoid calling v8 then. |
| 2156 if (m_externallyAllocatedMemory) { | 2156 if (m_externallyAllocatedMemory) { |
| 2157 ASSERT(v8::Isolate::GetCurrent()); | 2157 ASSERT(v8::Isolate::GetCurrent()); |
| 2158 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_exte
rnallyAllocatedMemory); | 2158 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_exte
rnallyAllocatedMemory); |
| 2159 } | 2159 } |
| 2160 } | 2160 } |
| 2161 | 2161 |
| 2162 } // namespace blink | 2162 } // namespace blink |
| OLD | NEW |