[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
kov at webkit.org
kov at webkit.org
Wed Mar 17 18:09:45 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 7b4c25300b9880ec60fc07c76bf245e7c4946f98
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 2 18:34:28 2010 +0000
2010-03-02 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Alexey Proskuryakov.
Test plugin still has issues with releasing objects, and variants
https://bugs.webkit.org/show_bug.cgi?id=35587
Fix the conditions for releasing the variants after calling
invoke, and avoid having a number of objects leak.
* DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
(testDocumentOpen):
(testWindowOpen):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55415 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ed2d9ee..995ac25 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,17 @@
+2010-03-02 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Test plugin still has issues with releasing objects, and variants
+ https://bugs.webkit.org/show_bug.cgi?id=35587
+
+ Fix the conditions for releasing the variants after calling
+ invoke, and avoid having a number of objects leak.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (testDocumentOpen):
+ (testWindowOpen):
+
2010-03-02 Chris Jerdonek <cjerdonek at webkit.org>
Reviewed by Shinichiro Hamaji.
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp
index ea130c2..58d2f38 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp
@@ -711,8 +711,10 @@ bool testDocumentOpen(NPP npp)
NPVariant docVariant;
browser->getproperty(npp, windowObject, documentId, &docVariant);
- if (docVariant.type != NPVariantType_Object)
+ if (docVariant.type != NPVariantType_Object) {
+ browser->releaseobject(windowObject);
return false;
+ }
NPObject *documentObject = NPVARIANT_TO_OBJECT(docVariant);
@@ -721,17 +723,25 @@ bool testDocumentOpen(NPP npp)
STRINGZ_TO_NPVARIANT("_blank", openArgs[1]);
NPVariant result;
- if (browser->invoke(npp, documentObject, openId, openArgs, 2, &result))
+ if (!browser->invoke(npp, documentObject, openId, openArgs, 2, &result)) {
+ browser->releaseobject(windowObject);
browser->releaseobject(documentObject);
+ return false;
+ }
- if (result.type == NPVariantType_Object) {
- pluginLogWithWindowObjectVariableArgs(windowObject, npp, "DOCUMENT OPEN SUCCESS");
- notifyTestCompletion(npp, result.value.objectValue);
- browser->releaseobject(result.value.objectValue);
- return true;
+ browser->releaseobject(documentObject);
+
+ if (result.type != NPVariantType_Object) {
+ browser->releaseobject(windowObject);
+ browser->releasevariantvalue(&result);
+ return false;
}
- return false;
+ pluginLogWithWindowObjectVariableArgs(windowObject, npp, "DOCUMENT OPEN SUCCESS");
+ notifyTestCompletion(npp, result.value.objectValue);
+ browser->releaseobject(result.value.objectValue);
+ browser->releaseobject(windowObject);
+ return true;
}
bool testWindowOpen(NPP npp)
@@ -748,14 +758,22 @@ bool testWindowOpen(NPP npp)
STRINGZ_TO_NPVARIANT("_blank", openArgs[1]);
NPVariant result;
- bool didSucceed = browser->invoke(npp, windowObject, openId, openArgs, 2, &result);
- if (didSucceed && (result.type == NPVariantType_Object)) {
- pluginLogWithWindowObjectVariableArgs(windowObject, npp, "WINDOW OPEN SUCCESS");
- notifyTestCompletion(npp, result.value.objectValue);
- browser->releaseobject(result.value.objectValue);
- return true;
+ if (!browser->invoke(npp, windowObject, openId, openArgs, 2, &result)) {
+ browser->releaseobject(windowObject);
+ return false;
}
- return false;
+
+ if (result.type != NPVariantType_Object) {
+ browser->releaseobject(windowObject);
+ browser->releasevariantvalue(&result);
+ return false;
+ }
+
+ pluginLogWithWindowObjectVariableArgs(windowObject, npp, "WINDOW OPEN SUCCESS");
+ notifyTestCompletion(npp, result.value.objectValue);
+ browser->releaseobject(result.value.objectValue);
+ browser->releaseobject(windowObject);
+ return true;
}
static bool testSetStatus(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list