Skip to content
Snippets Groups Projects
Commit 01522ebf authored by brettw@chromium.org's avatar brettw@chromium.org
Browse files

Pull latest PPAPI with some cleanup, update the var interface to reflect the

changes.

TEST=none
BUG=none

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51832 0039d316-1c4b-4281-b951-d872f2087c98
parent 267b87c0
No related merge requests found
......@@ -158,7 +158,7 @@ deps = {
Var("libvpx_revision"),
"src/third_party/ppapi":
"http://ppapi.googlecode.com/svn/trunk@128",
"http://ppapi.googlecode.com/svn/trunk@130",
"src/third_party/libjingle/source":
"http://libjingle.googlecode.com/svn/branches/nextsnap@" +
......
......@@ -687,7 +687,7 @@ void RemoveProperty(PP_Var var,
PP_Var Call(PP_Var var,
PP_Var method_name,
int32_t argc,
uint32_t argc,
PP_Var* argv,
PP_Var* exception) {
TryCatch try_catch(exception);
......@@ -703,18 +703,22 @@ PP_Var Call(PP_Var var,
NPIdentifier identifier;
if (method_name.type == PP_VarType_Void) {
identifier = NULL;
} else {
} else if (method_name.type == PP_VarType_String) {
// Specifically allow only string functions to be called.
identifier = PPVarToNPIdentifier(method_name);
if (!identifier) {
try_catch.SetException(kInvalidPropertyException);
return PP_MakeVoid();
}
} else {
try_catch.SetException(kInvalidPropertyException);
return PP_MakeVoid();
}
scoped_array<NPVariant> args;
if (argc) {
args.reset(new NPVariant[argc]);
for (int32_t i = 0; i < argc; ++i)
for (uint32_t i = 0; i < argc; ++i)
args[i] = PPVarToNPVariantNoCopy(argv[i]);
}
......@@ -741,7 +745,7 @@ PP_Var Call(PP_Var var,
}
PP_Var Construct(PP_Var var,
int32_t argc,
uint32_t argc,
PP_Var* argv,
PP_Var* exception) {
TryCatch try_catch(exception);
......@@ -757,7 +761,7 @@ PP_Var Construct(PP_Var var,
scoped_array<NPVariant> args;
if (argc) {
args.reset(new NPVariant[argc]);
for (int32_t i = 0; i < argc; ++i)
for (uint32_t i = 0; i < argc; ++i)
args[i] = PPVarToNPVariantNoCopy(argv[i]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment