OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |