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