| OLD | NEW |
| 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <assert.h> | 5 #include <assert.h> |
| 6 | 6 |
| 7 #include "native_client/src/include/nacl_string.h" | 7 #include "native_client/src/include/nacl_string.h" |
| 8 #include "native_client/src/include/nacl_macros.h" | 8 #include "native_client/src/include/nacl_macros.h" |
| 9 #include "native_client/src/include/portability.h" | 9 #include "native_client/src/include/portability.h" |
| 10 #include "native_client/src/trusted/plugin/utility.h" | 10 #include "native_client/src/trusted/plugin/utility.h" |
| 11 #include "native_client/src/trusted/plugin/array_ppapi.h" | 11 #include "native_client/src/trusted/plugin/array_ppapi.h" |
| 12 | 12 |
| 13 | 13 |
| 14 namespace plugin { | 14 namespace plugin { |
| 15 | 15 |
| 16 ArrayPpapi::ArrayPpapi(Plugin* instance) { | 16 ArrayPpapi::ArrayPpapi(Plugin* instance) { |
| 17 PLUGIN_PRINTF(("ArrayPpapi::ArrayPpapi (this=%p, instance=%p)\n", | 17 PLUGIN_PRINTF(("ArrayPpapi::ArrayPpapi (this=%p, instance=%p)\n", |
| 18 static_cast<void*>(this), static_cast<void*>(instance))); | 18 static_cast<void*>(this), static_cast<void*>(instance))); |
| 19 pp::VarPrivate window = instance->GetWindowObject(); | 19 pp::VarPrivate window = instance->GetWindowObject(); |
| 20 PLUGIN_PRINTF(("ArrayPpapi::ArrayPpapi (window=%d)\n", | 20 PLUGIN_PRINTF(("ArrayPpapi::ArrayPpapi (window=%d)\n", |
| 21 !window.is_undefined())); | 21 !window.is_undefined())); |
| 22 js_array_ = window.Call(pp::Var("eval"), pp::Var("new Array;")); | 22 js_array_ = window.Call(pp::Var("eval"), pp::Var("new Array;")); |
| 23 PLUGIN_PRINTF(("ArrayPpapi::ArrayPpapi (js_array_=%d)\n", | 23 PLUGIN_PRINTF(("ArrayPpapi::ArrayPpapi (js_array_=%d)\n", |
| 24 !js_array_.is_undefined())); | 24 !js_array_.is_undefined())); |
| 25 assert(!js_array_.is_undefined()); | 25 assert(!js_array_.is_undefined()); |
| 26 } | 26 } |
| 27 | 27 |
| 28 } // namespace plugin | 28 } // namespace plugin |
| OLD | NEW |