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

Side by Side Diff: content/renderer/pepper/v8_var_converter.cc

Issue 505013002: Remove implicit conversions from scoped_refptr to T* in content/renderer/pepper/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/pepper/v8_var_converter.h" 5 #include "content/renderer/pepper/v8_var_converter.h"
6 6
7 #include <map> 7 #include <map>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 case PP_VARTYPE_ARRAY: 151 case PP_VARTYPE_ARRAY:
152 *result = v8::Array::New(isolate); 152 *result = v8::Array::New(isolate);
153 break; 153 break;
154 case PP_VARTYPE_DICTIONARY: 154 case PP_VARTYPE_DICTIONARY:
155 *result = v8::Object::New(isolate); 155 *result = v8::Object::New(isolate);
156 break; 156 break;
157 case PP_VARTYPE_OBJECT: { 157 case PP_VARTYPE_OBJECT: {
158 DCHECK(object_vars_allowed); 158 DCHECK(object_vars_allowed);
159 scoped_refptr<V8ObjectVar> v8_object_var = V8ObjectVar::FromPPVar(var); 159 scoped_refptr<V8ObjectVar> v8_object_var = V8ObjectVar::FromPPVar(var);
160 if (!v8_object_var) { 160 if (!v8_object_var.get()) {
161 NOTREACHED(); 161 NOTREACHED();
162 result->Clear(); 162 result->Clear();
163 return false; 163 return false;
164 } 164 }
165 *result = v8_object_var->GetHandle(); 165 *result = v8_object_var->GetHandle();
166 break; 166 break;
167 } 167 }
168 case PP_VARTYPE_RESOURCE: 168 case PP_VARTYPE_RESOURCE:
169 if (!resource_converter->ToV8Value(var, context, result)) { 169 if (!resource_converter->ToV8Value(var, context, result)) {
170 result->Clear(); 170 result->Clear();
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 std::string(*name_utf8, name_utf8.length()), child_var); 594 std::string(*name_utf8, name_utf8.length()), child_var);
595 DCHECK(success); 595 DCHECK(success);
596 } 596 }
597 } 597 }
598 } 598 }
599 *result_var = root; 599 *result_var = root;
600 return true; 600 return true;
601 } 601 }
602 602
603 } // namespace content 603 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_graphics_3d_impl.h ('k') | content/renderer/pepper/video_decoder_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698