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

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

Issue 2957513002: Removed calls to RefPtr::Release in return statements with auto move. (Closed)
Patch Set: rebased Created 3 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/BasicShapeInterpolationFunctions.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 PassRefPtr<SerializedScriptValue> 76 PassRefPtr<SerializedScriptValue>
77 SerializedScriptValue::SerializeAndSwallowExceptions( 77 SerializedScriptValue::SerializeAndSwallowExceptions(
78 v8::Isolate* isolate, 78 v8::Isolate* isolate,
79 v8::Local<v8::Value> value) { 79 v8::Local<v8::Value> value) {
80 DummyExceptionStateForTesting exception_state; 80 DummyExceptionStateForTesting exception_state;
81 RefPtr<SerializedScriptValue> serialized = 81 RefPtr<SerializedScriptValue> serialized =
82 Serialize(isolate, value, SerializeOptions(), exception_state); 82 Serialize(isolate, value, SerializeOptions(), exception_state);
83 if (exception_state.HadException()) 83 if (exception_state.HadException())
84 return NullValue(); 84 return NullValue();
85 return serialized.Release(); 85 return serialized;
86 } 86 }
87 87
88 PassRefPtr<SerializedScriptValue> SerializedScriptValue::Create() { 88 PassRefPtr<SerializedScriptValue> SerializedScriptValue::Create() {
89 return AdoptRef(new SerializedScriptValue); 89 return AdoptRef(new SerializedScriptValue);
90 } 90 }
91 91
92 PassRefPtr<SerializedScriptValue> SerializedScriptValue::Create( 92 PassRefPtr<SerializedScriptValue> SerializedScriptValue::Create(
93 const String& data) { 93 const String& data) {
94 return AdoptRef(new SerializedScriptValue(data)); 94 return AdoptRef(new SerializedScriptValue(data));
95 } 95 }
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 std::transform(image_bitmap_contents_array_.begin(), 571 std::transform(image_bitmap_contents_array_.begin(),
572 image_bitmap_contents_array_.end(), 572 image_bitmap_contents_array_.end(),
573 received_->image_bitmaps.begin(), 573 received_->image_bitmaps.begin(),
574 [](RefPtr<StaticBitmapImage>& contents) { 574 [](RefPtr<StaticBitmapImage>& contents) {
575 return ImageBitmap::Create(std::move(contents)); 575 return ImageBitmap::Create(std::move(contents));
576 }); 576 });
577 image_bitmap_contents_array_.clear(); 577 image_bitmap_contents_array_.clear();
578 } 578 }
579 579
580 } // namespace blink 580 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/BasicShapeInterpolationFunctions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698