Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Unified Diff: ppapi/cpp/dev/scriptable_object_deprecated.cc

Issue 7349016: Added versioning for PPB_Core::MemAlloc and MemFree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes based on comments from dmichael Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/core.h ('k') | ppapi/cpp/private/var_private.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/scriptable_object_deprecated.cc
diff --git a/ppapi/cpp/dev/scriptable_object_deprecated.cc b/ppapi/cpp/dev/scriptable_object_deprecated.cc
index 59f44d1a871e3897e9721cb69d9343e774cedd7f..449e760063bbd597f3049daccff4e7db9429aec5 100644
--- a/ppapi/cpp/dev/scriptable_object_deprecated.cc
+++ b/ppapi/cpp/dev/scriptable_object_deprecated.cc
@@ -1,9 +1,9 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/cpp/dev/scriptable_object_deprecated.h"
-
+#include "ppapi/c/dev/ppb_memory_dev.h"
#include "ppapi/c/dev/ppp_class_deprecated.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/var.h"
@@ -70,8 +70,12 @@ void GetAllPropertyNames(void* object,
if (props.empty())
return;
*property_count = static_cast<uint32_t>(props.size());
+
+ const PPB_Memory_Dev* memory_if = static_cast<const PPB_Memory_Dev*>(
+ pp::Module::Get()->GetBrowserInterface(PPB_MEMORY_DEV_INTERFACE));
*properties = static_cast<PP_Var*>(
- Module::Get()->core()->MemAlloc(sizeof(PP_Var) * props.size()));
+ memory_if->MemAlloc(sizeof(PP_Var) * props.size()));
+
for (size_t i = 0; i < props.size(); ++i)
(*properties)[i] = props[i].Detach();
}
« no previous file with comments | « ppapi/cpp/core.h ('k') | ppapi/cpp/private/var_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698