Skip to content
Permalink
Browse files
WebKitTools
2010-03-01  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        Reviewed by Eric Seidel.

        [GTK] plugins/setProperty.html fails on 64bit Release
        https://bugs.webkit.org/show_bug.cgi?id=35425

        Check invoke's return code before releasing the variant, since
        there's a chance it won't be properly initialized, leading to
        memory corruption, in some cases.

        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
        (testCallback):
        (testEnumerate):
        (testDocumentOpen):
        (testWindowOpen):
        (handleCallback):

LayoutTests

2010-03-01  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        Reviewed by Eric Seidel.

        [GTK] plugins/setProperty.html fails on 64bit Release
        https://bugs.webkit.org/show_bug.cgi?id=35425

        Unskip the tests that failed as a consequence of the memory
        corruption.

        * platform/gtk/Skipped:

Canonical link: https://commits.webkit.org/46693@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
kov committed Mar 2, 2010
1 parent 968ea42 commit 59081ca3c1ddea3397765e0e3f22e00b26782a10
Showing 4 changed files with 41 additions and 14 deletions.
@@ -1,3 +1,15 @@
2010-03-01 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Reviewed by Eric Seidel.

[GTK] plugins/setProperty.html fails on 64bit Release
https://bugs.webkit.org/show_bug.cgi?id=35425

Unskip the tests that failed as a consequence of the memory
corruption.

* platform/gtk/Skipped:

2010-03-01 Chris Fleizach <cfleizach@apple.com>

Reviewed by Darin Adler.
@@ -3588,10 +3588,6 @@ plugins/mouse-events-fixedpos.html
# https://bugs.webkit.org/show_bug.cgi?id=30561
plugins/private-browsing-mode.html

# https://bugs.webkit.org/show_bug.cgi?id=35425
plugins/setProperty.html
plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html

# https://bugs.webkit.org/show_bug.cgi?id=30561
plugins/private-browsing-mode.html
# https://bugs.webkit.org/show_bug.cgi?id=33180
@@ -1,3 +1,21 @@
2010-03-01 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Reviewed by Eric Seidel.

[GTK] plugins/setProperty.html fails on 64bit Release
https://bugs.webkit.org/show_bug.cgi?id=35425

Check invoke's return code before releasing the variant, since
there's a chance it won't be properly initialized, leading to
memory corruption, in some cases.

* DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
(testCallback):
(testEnumerate):
(testDocumentOpen):
(testWindowOpen):
(handleCallback):

2010-03-01 Dirk Pranke <dpranke@chromium.org>

Reviewed by nobody. Build bustage :(
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2009 Holger Hans Peter Freyther
* Copyright (C) 2010 Collabora Ltd.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -405,8 +406,8 @@ static bool testCallback(PluginObject* obj, const NPVariant* args, uint32_t argC
free(callbackString);

NPVariant browserResult;
browser->invoke(obj->npp, windowScriptObject, callbackIdentifier, 0, 0, &browserResult);
browser->releasevariantvalue(&browserResult);
if (browser->invoke(obj->npp, windowScriptObject, callbackIdentifier, 0, 0, &browserResult))
browser->releasevariantvalue(&browserResult);

browser->releaseobject(windowScriptObject);

@@ -519,8 +520,8 @@ static bool testEnumerate(PluginObject* obj, const NPVariant* args, uint32_t arg
NPVariant args[1];
STRINGZ_TO_NPVARIANT(string, args[0]);
NPVariant browserResult;
browser->invoke(obj->npp, outArray, pushIdentifier, args, 1, &browserResult);
browser->releasevariantvalue(&browserResult);
if (browser->invoke(obj->npp, outArray, pushIdentifier, args, 1, &browserResult))
browser->releasevariantvalue(&browserResult);
browser->memfree(string);
}

@@ -720,8 +721,8 @@ bool testDocumentOpen(NPP npp)
STRINGZ_TO_NPVARIANT("_blank", openArgs[1]);

NPVariant result;
browser->invoke(npp, documentObject, openId, openArgs, 2, &result);
browser->releaseobject(documentObject);
if (browser->invoke(npp, documentObject, openId, openArgs, 2, &result))
browser->releaseobject(documentObject);

if (result.type == NPVariantType_Object) {
pluginLogWithWindowObjectVariableArgs(windowObject, npp, "DOCUMENT OPEN SUCCESS");
@@ -747,8 +748,8 @@ bool testWindowOpen(NPP npp)
STRINGZ_TO_NPVARIANT("_blank", openArgs[1]);

NPVariant result;
browser->invoke(npp, windowObject, openId, openArgs, 2, &result);
if (result.type == NPVariantType_Object) {
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);
@@ -947,8 +948,8 @@ void handleCallback(PluginObject* object, const char *url, NPReason reason, void
NULL_TO_NPVARIANT(args[1]);

NPVariant browserResult;
browser->invoke(object->npp, windowScriptObject, callbackIdentifier, args, 2, &browserResult);
browser->releasevariantvalue(&browserResult);
if (browser->invoke(object->npp, windowScriptObject, callbackIdentifier, args, 2, &browserResult))
browser->releasevariantvalue(&browserResult);

free(strHdr);
}

0 comments on commit 59081ca

Please sign in to comment.