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

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

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/serialization/V8ScriptValueSerializer.h" 5 #include "bindings/core/v8/serialization/V8ScriptValueSerializer.h"
6 6
7 #include "bindings/core/v8/ToV8.h" 7 #include "bindings/core/v8/ToV8.h"
8 #include "bindings/core/v8/V8Blob.h" 8 #include "bindings/core/v8/V8Blob.h"
9 #include "bindings/core/v8/V8CompositorProxy.h" 9 #include "bindings/core/v8/V8CompositorProxy.h"
10 #include "bindings/core/v8/V8File.h" 10 #include "bindings/core/v8/V8File.h"
(...skipping 11 matching lines...) Expand all
22 #include "wtf/DateMath.h" 22 #include "wtf/DateMath.h"
23 #include "wtf/allocator/Partitions.h" 23 #include "wtf/allocator/Partitions.h"
24 #include "wtf/text/StringUTF8Adaptor.h" 24 #include "wtf/text/StringUTF8Adaptor.h"
25 25
26 namespace blink { 26 namespace blink {
27 27
28 V8ScriptValueSerializer::V8ScriptValueSerializer( 28 V8ScriptValueSerializer::V8ScriptValueSerializer(
29 RefPtr<ScriptState> scriptState) 29 RefPtr<ScriptState> scriptState)
30 : m_scriptState(std::move(scriptState)), 30 : m_scriptState(std::move(scriptState)),
31 m_serializedScriptValue(SerializedScriptValue::create()), 31 m_serializedScriptValue(SerializedScriptValue::create()),
32 m_serializer(m_scriptState->isolate(), this) { 32 m_serializer(m_scriptState->isolate(), this) {}
33 }
34 33
35 RefPtr<SerializedScriptValue> V8ScriptValueSerializer::serialize( 34 RefPtr<SerializedScriptValue> V8ScriptValueSerializer::serialize(
36 v8::Local<v8::Value> value, 35 v8::Local<v8::Value> value,
37 Transferables* transferables, 36 Transferables* transferables,
38 ExceptionState& exceptionState) { 37 ExceptionState& exceptionState) {
39 #if DCHECK_IS_ON() 38 #if DCHECK_IS_ON()
40 DCHECK(!m_serializeInvoked); 39 DCHECK(!m_serializeInvoked);
41 m_serializeInvoked = true; 40 m_serializeInvoked = true;
42 #endif 41 #endif
43 DCHECK(m_serializedScriptValue); 42 DCHECK(m_serializedScriptValue);
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 *actualSize = WTF::Partitions::bufferActualSize(size); 405 *actualSize = WTF::Partitions::bufferActualSize(size);
407 return WTF::Partitions::bufferRealloc(oldBuffer, *actualSize, 406 return WTF::Partitions::bufferRealloc(oldBuffer, *actualSize,
408 "SerializedScriptValue buffer"); 407 "SerializedScriptValue buffer");
409 } 408 }
410 409
411 void V8ScriptValueSerializer::FreeBufferMemory(void* buffer) { 410 void V8ScriptValueSerializer::FreeBufferMemory(void* buffer) {
412 return WTF::Partitions::bufferFree(buffer); 411 return WTF::Partitions::bufferFree(buffer);
413 } 412 }
414 413
415 } // namespace blink 414 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698