[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-27-g795e0c6 |
Date: |
Wed, 09 Feb 2011 19:56:14 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via 795e0c6f00b11bd4526e95bf021d1eb764813f37 (commit)
from 9c9f1669087ae6796f14a3cc3ca429db9c66fa07 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=795e0c6f00b11bd4526e95bf021d1eb764813f37
commit 795e0c6f00b11bd4526e95bf021d1eb764813f37
Author: Sandro Santilli <address@hidden>
Date: Wed Feb 9 20:55:09 2011 +0100
Properly initialize referenceCount for NPNObject structs. The _correct_ way
of creating an object would be trough NPN_CreateObject but that's out of my
reach atm. This one fixes memory errors triggered by the test.cpp.
diff --git a/plugin/npapi/external.cpp b/plugin/npapi/external.cpp
index 17a2497..f84f832 100644
--- a/plugin/npapi/external.cpp
+++ b/plugin/npapi/external.cpp
@@ -296,6 +296,7 @@ ExternalInterface::parseXML(const std::string &xml)
STRINGN_TO_NPVARIANT(data, length, value);
} else if (tag == "<array>") {
NPObject *obj = (NPObject *)NPN_MemAlloc(sizeof(NPObject));
+ obj->referenceCount = 1;
start = end;
end = xml.find("</array");
std::string str = xml.substr(start, end-start);
@@ -307,9 +308,9 @@ ExternalInterface::parseXML(const std::string &xml)
NPN_SetProperty(NULL, obj, id, &value.get());
}
OBJECT_TO_NPVARIANT(obj, value);
- NPN_RetainObject(obj);
} else if (tag == "<object>") {
NPObject *obj = (NPObject *)NPN_MemAlloc(sizeof(NPObject));
+ obj->referenceCount = 1;
start = end;
end = xml.find("</object");
std::string str = xml.substr(start, end-start);
@@ -321,7 +322,6 @@ ExternalInterface::parseXML(const std::string &xml)
NPN_SetProperty(NULL, obj, id, &value.get());
}
OBJECT_TO_NPVARIANT(obj, value);
- NPN_RetainObject(obj);
}
}
-----------------------------------------------------------------------
Summary of changes:
plugin/npapi/external.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-27-g795e0c6,
Sandro Santilli <=