| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 PassRefPtr<SerializedScriptValue> release(); | 76 PassRefPtr<SerializedScriptValue> release(); |
| 77 | 77 |
| 78 String toWireString() const { return m_data; } | 78 String toWireString() const { return m_data; } |
| 79 Vector<uint8_t> toWireBytes() const; | 79 Vector<uint8_t> toWireBytes() const; |
| 80 | 80 |
| 81 // Deserializes the value (in the current context). Returns a null value in | 81 // Deserializes the value (in the current context). Returns a null value in |
| 82 // case of failure. | 82 // case of failure. |
| 83 v8::Handle<v8::Value> deserialize(MessagePortArray* = 0); | 83 v8::Handle<v8::Value> deserialize(MessagePortArray* = 0); |
| 84 v8::Handle<v8::Value> deserialize(v8::Isolate*, MessagePortArray* = 0); | 84 v8::Handle<v8::Value> deserialize(v8::Isolate*, MessagePortArray* = 0); |
| 85 | 85 |
| 86 #if ENABLE(INSPECTOR) | |
| 87 ScriptValue deserializeForInspector(ScriptState*); | 86 ScriptValue deserializeForInspector(ScriptState*); |
| 88 #endif | |
| 89 | 87 |
| 90 const Vector<String>& blobURLs() const { return m_blobURLs; } | 88 const Vector<String>& blobURLs() const { return m_blobURLs; } |
| 91 | 89 |
| 92 // Informs the V8 about external memory allocated and owned by this object.
Large values should contribute | 90 // Informs the V8 about external memory allocated and owned by this object.
Large values should contribute |
| 93 // to GC counters to eventually trigger a GC, otherwise flood of postMessage
() can cause OOM. | 91 // to GC counters to eventually trigger a GC, otherwise flood of postMessage
() can cause OOM. |
| 94 // Ok to invoke multiple times (only adds memory once). | 92 // Ok to invoke multiple times (only adds memory once). |
| 95 // The memory registration is revoked automatically in destructor. | 93 // The memory registration is revoked automatically in destructor. |
| 96 void registerMemoryAllocatedWithCurrentScriptContext(); | 94 void registerMemoryAllocatedWithCurrentScriptContext(); |
| 97 | 95 |
| 98 private: | 96 private: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 110 | 108 |
| 111 String m_data; | 109 String m_data; |
| 112 OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray; | 110 OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray; |
| 113 Vector<String> m_blobURLs; | 111 Vector<String> m_blobURLs; |
| 114 intptr_t m_externallyAllocatedMemory; | 112 intptr_t m_externallyAllocatedMemory; |
| 115 }; | 113 }; |
| 116 | 114 |
| 117 } // namespace WebCore | 115 } // namespace WebCore |
| 118 | 116 |
| 119 #endif // SerializedScriptValue_h | 117 #endif // SerializedScriptValue_h |
| OLD | NEW |