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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.cpp

Issue 1862033002: Make OffscreenCanvas Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, compiles but crashes some layout tests Created 4 years, 8 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/SerializedScriptValueFactory.h" 5 #include "bindings/core/v8/SerializedScriptValueFactory.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/ScriptValueSerializer.h" 8 #include "bindings/core/v8/ScriptValueSerializer.h"
9 #include "bindings/core/v8/Transferables.h" 9 #include "bindings/core/v8/Transferables.h"
10 #include "core/dom/DOMArrayBuffer.h" 10 #include "core/dom/DOMArrayBuffer.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // information stored in m_data isn't even encoded in UTF-16. Instead, 148 // information stored in m_data isn't even encoded in UTF-16. Instead,
149 // unicode characters are encoded as UTF-8 with two code units per UChar. 149 // unicode characters are encoded as UTF-8 with two code units per UChar.
150 SerializedScriptValueReader reader(reinterpret_cast<const uint8_t*>(data.imp l()->characters16()), 2 * data.length(), blobInfo, blobDataHandles, ScriptState: :current(isolate)); 150 SerializedScriptValueReader reader(reinterpret_cast<const uint8_t*>(data.imp l()->characters16()), 2 * data.length(), blobInfo, blobDataHandles, ScriptState: :current(isolate));
151 ScriptValueDeserializer deserializer(reader, messagePorts, arrayBufferConten tsArray, imageBitmapContentsArray); 151 ScriptValueDeserializer deserializer(reader, messagePorts, arrayBufferConten tsArray, imageBitmapContentsArray);
152 152
153 // deserialize() can run arbitrary script (e.g., setters), which could resul t in |this| being destroyed. 153 // deserialize() can run arbitrary script (e.g., setters), which could resul t in |this| being destroyed.
154 // Holding a RefPtr ensures we are alive (along with our internal data) thro ughout the operation. 154 // Holding a RefPtr ensures we are alive (along with our internal data) thro ughout the operation.
155 return deserializer.deserialize(); 155 return deserializer.deserialize();
156 } 156 }
157 157
158
159 } // namespace blink 158 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698