[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:35:29 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 0365f524b291ecfc62ec8f3c7cb25d92990c3546
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 13 06:42:43 2009 +0000
2009-11-12 Anantanarayanan G Iyengar <ananta at chromium.org>
Reviewed by Adam Barth.
The document-html and window-html tests don't use a setTimeout to notify that the
test is completed. The layout test plugin now issues the notifyDone call via
javascript.
https://bugs.webkit.org/show_bug.cgi?id=31067
* plugins/document-open.html:
* plugins/window-open.html:
2009-11-12 Anantanarayanan G Iyengar <ananta at chromium.org>
Reviewed by Adam Barth.
The document-open.html test was flaky at times. The test invokes the layout test plugin
which in its destroy stream handler opens a new document. This basically tears down the
stream and the associated plugin instance, which causes a crash when the plugin stream
dereferences an invalid m_client pointer which points to the PluginView instance which
is invalid at this time. Fix is to set the m_client pointer to NULL in the stop function
and check for the same.
https://bugs.webkit.org/show_bug.cgi?id=31067
* plugins/PluginStream.cpp:
(WebCore::PluginStream::stop):
(WebCore::PluginStream::destroyStream):
2009-11-12 Anantanarayanan G Iyengar <ananta at chromium.org>
Reviewed by Adam Barth.
The document-open.html test was flaky at times. The test invokes the layout test plugin
which in its destroy stream handler opens a new document. This basically tears down the
stream and the associated plugin instance. The pluginLog function in the layout test
plugin attempts to retrieve the window script object on a torn down plugin instance
which crashed consistently on windows in the debugger. The functions which issue
these logs already have a valid window script object. We now have variants of the pluginLog
function which take in a window script object with and without variable arguments.
https://bugs.webkit.org/show_bug.cgi?id=31067
* DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
(pluginLogWithWindowObject):
(pluginLogWithWindowObjectVariableArgs):
(pluginLog):
(notifyTestCompletion):
(testDocumentOpen):
(testWindowOpen):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2868154..b7ac75f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2009-11-12 Anantanarayanan G Iyengar <ananta at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ The document-html and window-html tests don't use a setTimeout to notify that the
+ test is completed. The layout test plugin now issues the notifyDone call via
+ javascript.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31067
+
+ * plugins/document-open.html:
+ * plugins/window-open.html:
+
2009-11-12 Kinuko Yasuda <kinuko at google.com>
Reviewed by Adam Barth.
diff --git a/LayoutTests/plugins/document-open.html b/LayoutTests/plugins/document-open.html
index ea7ff0d..7c9df70 100644
--- a/LayoutTests/plugins/document-open.html
+++ b/LayoutTests/plugins/document-open.html
@@ -11,12 +11,10 @@
This tests that document.open invoked by a plugin via NPN_Invoke without a javascript context succeeds.
</div>
<script>
- if (window.layoutTestController) {
- layoutTestController.dumpAsText();
- layoutTestController.waitUntilDone();
- // If we are not done within 50 ms then we assume that the test failed.
- setTimeout('layoutTestController.notifyDone()', 50);
- }
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ }
</script>
</body>
</html>
diff --git a/LayoutTests/plugins/window-open.html b/LayoutTests/plugins/window-open.html
index aedef2d..b847482 100644
--- a/LayoutTests/plugins/window-open.html
+++ b/LayoutTests/plugins/window-open.html
@@ -5,9 +5,6 @@
layoutTestController.setCanOpenWindows();
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
-
- // If we are not done within 50 ms then we assume that the test failed.
- setTimeout('layoutTestController.notifyDone()', 50);
}
</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0d1d92b..0870ee7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2009-11-12 Anantanarayanan G Iyengar <ananta at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ The document-open.html test was flaky at times. The test invokes the layout test plugin
+ which in its destroy stream handler opens a new document. This basically tears down the
+ stream and the associated plugin instance, which causes a crash when the plugin stream
+ dereferences an invalid m_client pointer which points to the PluginView instance which
+ is invalid at this time. Fix is to set the m_client pointer to NULL in the stop function
+ and check for the same.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31067
+
+ * plugins/PluginStream.cpp:
+ (WebCore::PluginStream::stop):
+ (WebCore::PluginStream::destroyStream):
+
2009-11-12 Dumitru Daniliuc <dumi at chromium.org>
Reviewed by Dimitri Glazkov.
diff --git a/WebCore/plugins/PluginStream.cpp b/WebCore/plugins/PluginStream.cpp
index cd9f83d..4be3d13 100644
--- a/WebCore/plugins/PluginStream.cpp
+++ b/WebCore/plugins/PluginStream.cpp
@@ -120,6 +120,8 @@ void PluginStream::stop()
m_loader->cancel();
m_loader = 0;
}
+
+ m_client = 0;
}
void PluginStream::startStream()
@@ -305,7 +307,7 @@ void PluginStream::destroyStream()
m_streamState = StreamStopped;
- if (!m_loadManually)
+ if (!m_loadManually && m_client)
m_client->streamDidFinishLoading(this);
if (!m_path.isNull()) {
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 4f13791..c11fc65 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,25 @@
+2009-11-12 Anantanarayanan G Iyengar <ananta at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ The document-open.html test was flaky at times. The test invokes the layout test plugin
+ which in its destroy stream handler opens a new document. This basically tears down the
+ stream and the associated plugin instance. The pluginLog function in the layout test
+ plugin attempts to retrieve the window script object on a torn down plugin instance
+ which crashed consistently on windows in the debugger. The functions which issue
+ these logs already have a valid window script object. We now have variants of the pluginLog
+ function which take in a window script object with and without variable arguments.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31067
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (pluginLogWithWindowObject):
+ (pluginLogWithWindowObjectVariableArgs):
+ (pluginLog):
+ (notifyTestCompletion):
+ (testDocumentOpen):
+ (testWindowOpen):
+
2009-11-12 Joanmarie Diggs <joanmarie.diggs at gmail.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp
index 9c2b9d5..610c4fb 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp
@@ -34,25 +34,12 @@
#include <string.h>
#include <stdlib.h>
-void pluginLog(NPP instance, const char* format, ...)
+// Helper function which takes in the plugin window object for logging to the console object.
+static void pluginLogWithWindowObject(NPObject* windowObject, NPP instance, const char* message)
{
- va_list args;
- va_start(args, format);
- char message[2048] = "PLUGIN: ";
- vsprintf(message + strlen(message), format, args);
- va_end(args);
-
- NPObject* windowObject = 0;
- NPError error = browser->getvalue(instance, NPNVWindowNPObject, &windowObject);
- if (error != NPERR_NO_ERROR) {
- fprintf(stderr, "Failed to retrieve window object while logging: %s\n", message);
- return;
- }
-
NPVariant consoleVariant;
if (!browser->getproperty(instance, windowObject, browser->getstringidentifier("console"), &consoleVariant)) {
fprintf(stderr, "Failed to retrieve console object while logging: %s\n", message);
- browser->releaseobject(windowObject);
return;
}
@@ -65,12 +52,43 @@ void pluginLog(NPP instance, const char* format, ...)
if (!browser->invoke(instance, consoleObject, browser->getstringidentifier("log"), &messageVariant, 1, &result)) {
fprintf(stderr, "Failed to invoke console.log while logging: %s\n", message);
browser->releaseobject(consoleObject);
- browser->releaseobject(windowObject);
return;
}
browser->releasevariantvalue(&result);
browser->releaseobject(consoleObject);
+}
+
+// Helper function which takes in the plugin window object for logging to the console object. This function supports variable
+// arguments.
+static void pluginLogWithWindowObjectVariableArgs(NPObject* windowObject, NPP instance, const char* format, ...)
+{
+ va_list args;
+ va_start(args, format);
+ char message[2048] = "PLUGIN: ";
+ vsprintf(message + strlen(message), format, args);
+ va_end(args);
+
+ pluginLogWithWindowObject(windowObject, instance, message);
+}
+
+// Helper function to log to the console object.
+void pluginLog(NPP instance, const char* format, ...)
+{
+ va_list args;
+ va_start(args, format);
+ char message[2048] = "PLUGIN: ";
+ vsprintf(message + strlen(message), format, args);
+ va_end(args);
+
+ NPObject* windowObject = 0;
+ NPError error = browser->getvalue(instance, NPNVWindowNPObject, &windowObject);
+ if (error != NPERR_NO_ERROR) {
+ fprintf(stderr, "Failed to retrieve window object while logging: %s\n", message);
+ return;
+ }
+
+ pluginLogWithWindowObject(windowObject, instance, message);
browser->releaseobject(windowObject);
}
@@ -643,7 +661,19 @@ static bool testConstruct(PluginObject* obj, const NPVariant* args, uint32_t arg
return browser->construct(obj->npp, NPVARIANT_TO_OBJECT(args[0]), args + 1, argCount - 1, result);
}
-bool testDocumentOpen(NPP npp) {
+// Helper function to notify the layout test controller that the test completed.
+void notifyTestCompletion(NPP npp, NPObject* object)
+{
+ NPVariant result;
+ NPString script;
+ script.UTF8Characters = "javascript:window.layoutTestController.notifyDone();";
+ script.UTF8Length = strlen("javascript:window.layoutTestController.notifyDone();");
+ browser->evaluate(npp, object, &script, &result);
+ browser->releasevariantvalue(&result);
+}
+
+bool testDocumentOpen(NPP npp)
+{
NPIdentifier documentId = browser->getstringidentifier("document");
NPIdentifier openId = browser->getstringidentifier("open");
@@ -668,14 +698,17 @@ bool testDocumentOpen(NPP npp) {
browser->releaseobject(documentObject);
if (result.type == NPVariantType_Object) {
+ pluginLogWithWindowObjectVariableArgs(windowObject, npp, "DOCUMENT OPEN SUCCESS");
+ notifyTestCompletion(npp, result.value.objectValue);
browser->releaseobject(result.value.objectValue);
- pluginLog(npp, "DOCUMENT OPEN SUCCESS");
return true;
}
+
return false;
}
-bool testWindowOpen(NPP npp) {
+bool testWindowOpen(NPP npp)
+{
NPIdentifier openId = browser->getstringidentifier("open");
NPObject *windowObject = NULL;
@@ -690,8 +723,9 @@ bool testWindowOpen(NPP npp) {
NPVariant result;
browser->invoke(npp, windowObject, openId, openArgs, 2, &result);
if (result.type == NPVariantType_Object) {
+ pluginLogWithWindowObjectVariableArgs(windowObject, npp, "WINDOW OPEN SUCCESS");
+ notifyTestCompletion(npp, result.value.objectValue);
browser->releaseobject(result.value.objectValue);
- pluginLog(npp, "WINDOW OPEN SUCCESS");
return true;
}
return false;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list