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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 } | 241 } |
242 | 242 |
243 if (try_catch.HasException()) | 243 if (try_catch.HasException()) |
244 return PP_MakeUndefined(); | 244 return PP_MakeUndefined(); |
245 | 245 |
246 if (!function->IsFunction()) { | 246 if (!function->IsFunction()) { |
247 try_catch.SetException(kUnableToCallMethodException); | 247 try_catch.SetException(kUnableToCallMethodException); |
248 return PP_MakeUndefined(); | 248 return PP_MakeUndefined(); |
249 } | 249 } |
250 | 250 |
251 #ifdef WEB_FRAME_USES_V8_LOCAL | |
252 scoped_ptr<v8::Local<v8::Value>[]> converted_args( | |
253 new v8::Local<v8::Value>[argc]); | |
254 #else | |
255 scoped_ptr<v8::Handle<v8::Value>[] > converted_args( | 251 scoped_ptr<v8::Handle<v8::Value>[] > converted_args( |
256 new v8::Handle<v8::Value>[argc]); | 252 new v8::Handle<v8::Value>[argc]); |
257 #endif | |
258 | |
259 for (uint32_t i = 0; i < argc; ++i) { | 253 for (uint32_t i = 0; i < argc; ++i) { |
260 converted_args[i] = try_catch.ToV8(argv[i]); | 254 converted_args[i] = try_catch.ToV8(argv[i]); |
261 if (try_catch.HasException()) | 255 if (try_catch.HasException()) |
262 return PP_MakeUndefined(); | 256 return PP_MakeUndefined(); |
263 } | 257 } |
264 | 258 |
265 blink::WebPluginContainer* container = accessor.instance()->container(); | 259 blink::WebPluginContainer* container = accessor.instance()->container(); |
266 blink::WebLocalFrame* frame = NULL; | 260 blink::WebLocalFrame* frame = NULL; |
267 if (container) | 261 if (container) |
268 frame = container->element().document().frame(); | 262 frame = container->element().document().frame(); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 &CallDeprecated, | 359 &CallDeprecated, |
366 &Construct, | 360 &Construct, |
367 &IsInstanceOfDeprecated, | 361 &IsInstanceOfDeprecated, |
368 &CreateObjectDeprecated, | 362 &CreateObjectDeprecated, |
369 &CreateObjectWithModuleDeprecated, }; | 363 &CreateObjectWithModuleDeprecated, }; |
370 | 364 |
371 return &var_deprecated_interface; | 365 return &var_deprecated_interface; |
372 } | 366 } |
373 | 367 |
374 } // namespace content | 368 } // namespace content |
OLD | NEW |