diff options
Diffstat (limited to 'Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp')
-rw-r--r-- | Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp index 24ee12c..75b848b 100644 --- a/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp +++ b/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp @@ -73,14 +73,10 @@ static void pluginLogWithWindowObjectVariableArgs(NPObject* windowObject, NPP in pluginLogWithWindowObject(windowObject, instance, message); } -// Helper function to log to the console object. -void pluginLog(NPP instance, const char* format, ...) +void pluginLogWithArguments(NPP instance, const char* format, va_list args) { - 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); @@ -93,6 +89,15 @@ void pluginLog(NPP instance, const char* format, ...) browser->releaseobject(windowObject); } +// Helper function to log to the console object. +void pluginLog(NPP instance, const char* format, ...) +{ + va_list args; + va_start(args, format); + pluginLogWithArguments(instance, format, args); + va_end(args); +} + static void pluginInvalidate(NPObject*); static bool pluginHasProperty(NPObject*, NPIdentifier name); static bool pluginHasMethod(NPObject*, NPIdentifier name); |