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

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

Issue 753523002: remove some calls to to-be-deprecated v8::Value::To* functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ppb_var_deprecated_impl.h" 5 #include "content/renderer/pepper/ppb_var_deprecated_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "content/renderer/pepper/host_globals.h" 9 #include "content/renderer/pepper/host_globals.h"
10 #include "content/renderer/pepper/message_channel.h" 10 #include "content/renderer/pepper/message_channel.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 if (!v8_method_name->IsString()) { 229 if (!v8_method_name->IsString()) {
230 try_catch.SetException(kUnableToCallMethodException); 230 try_catch.SetException(kUnableToCallMethodException);
231 return PP_MakeUndefined(); 231 return PP_MakeUndefined();
232 } 232 }
233 233
234 v8::Handle<v8::Object> function = accessor.GetObject(); 234 v8::Handle<v8::Object> function = accessor.GetObject();
235 v8::Handle<v8::Object> recv = 235 v8::Handle<v8::Object> recv =
236 accessor.instance()->GetMainWorldContext()->Global(); 236 accessor.instance()->GetMainWorldContext()->Global();
237 if (v8_method_name.As<v8::String>()->Length() != 0) { 237 if (v8_method_name.As<v8::String>()->Length() != 0) {
238 function = function->Get(v8_method_name)->ToObject(); 238 function = function->Get(v8_method_name)
239 ->ToObject(accessor.instance()->GetIsolate());
239 recv = accessor.GetObject(); 240 recv = accessor.GetObject();
240 } 241 }
241 242
242 if (try_catch.HasException()) 243 if (try_catch.HasException())
243 return PP_MakeUndefined(); 244 return PP_MakeUndefined();
244 245
245 if (!function->IsFunction()) { 246 if (!function->IsFunction()) {
246 try_catch.SetException(kUnableToCallMethodException); 247 try_catch.SetException(kUnableToCallMethodException);
247 return PP_MakeUndefined(); 248 return PP_MakeUndefined();
248 } 249 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 &CallDeprecated, 359 &CallDeprecated,
359 &Construct, 360 &Construct,
360 &IsInstanceOfDeprecated, 361 &IsInstanceOfDeprecated,
361 &CreateObjectDeprecated, 362 &CreateObjectDeprecated,
362 &CreateObjectWithModuleDeprecated, }; 363 &CreateObjectWithModuleDeprecated, };
363 364
364 return &var_deprecated_interface; 365 return &var_deprecated_interface;
365 } 366 }
366 367
367 } // namespace content 368 } // namespace content
OLDNEW
« no previous file with comments | « components/translate/content/renderer/translate_helper.cc ('k') | content/renderer/pepper/v8_var_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698