| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include <assert.h> | |
| 6 | |
| 7 #include "native_client/src/include/nacl_string.h" | |
| 8 #include "native_client/src/include/nacl_macros.h" | |
| 9 #include "native_client/src/include/portability.h" | |
| 10 #include "native_client/src/trusted/plugin/utility.h" | |
| 11 #include "native_client/src/trusted/plugin/array_ppapi.h" | |
| 12 | |
| 13 | |
| 14 namespace plugin { | |
| 15 | |
| 16 ArrayPpapi::ArrayPpapi(Plugin* instance) { | |
| 17 PLUGIN_PRINTF(("ArrayPpapi::ArrayPpapi (this=%p, instance=%p)\n", | |
| 18 static_cast<void*>(this), static_cast<void*>(instance))); | |
| 19 pp::VarPrivate window = instance->GetWindowObject(); | |
| 20 PLUGIN_PRINTF(("ArrayPpapi::ArrayPpapi (window=%d)\n", | |
| 21 !window.is_undefined())); | |
| 22 js_array_ = window.Call(pp::Var("eval"), pp::Var("new Array;")); | |
| 23 PLUGIN_PRINTF(("ArrayPpapi::ArrayPpapi (js_array_=%d)\n", | |
| 24 !js_array_.is_undefined())); | |
| 25 assert(!js_array_.is_undefined()); | |
| 26 } | |
| 27 | |
| 28 } // namespace plugin | |
| OLD | NEW |