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

Side by Side Diff: chrome/renderer/extensions/platform_keys_natives.cc

Issue 2931393003: [Content] Update V8ValueConverter::create to return a std::unique_ptr (Closed)
Patch Set: rebase Created 3 years, 6 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 "chrome/renderer/extensions/platform_keys_natives.h" 5 #include "chrome/renderer/extensions/platform_keys_natives.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 v8::Local<v8::Object>::Cast(call_info[0]), operation, &exception_code, 118 v8::Local<v8::Object>::Cast(call_info[0]), operation, &exception_code,
119 &error_details, call_info.GetIsolate()); 119 &error_details, call_info.GetIsolate());
120 120
121 std::unique_ptr<base::DictionaryValue> algorithm_dict; 121 std::unique_ptr<base::DictionaryValue> algorithm_dict;
122 if (!algorithm.IsNull()) 122 if (!algorithm.IsNull())
123 algorithm_dict = WebCryptoAlgorithmToBaseValue(algorithm); 123 algorithm_dict = WebCryptoAlgorithmToBaseValue(algorithm);
124 124
125 if (!algorithm_dict) 125 if (!algorithm_dict)
126 return; 126 return;
127 127
128 std::unique_ptr<content::V8ValueConverter> converter( 128 call_info.GetReturnValue().Set(content::V8ValueConverter::Create()->ToV8Value(
129 content::V8ValueConverter::create()); 129 algorithm_dict.get(), context()->v8_context()));
130 call_info.GetReturnValue().Set(
131 converter->ToV8Value(algorithm_dict.get(), context()->v8_context()));
132 } 130 }
133 131
134 } // namespace extensions 132 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/cast_streaming_native_handler.cc ('k') | chrome/renderer/sandbox_status_extension_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698