Changeset 136697 in webkit


Ignore:
Timestamp:
Dec 5, 2012, 9:09:34 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[Gtk] navigator.plugins contains too many plugin entries. First one are garbages
https://bugs.webkit.org/show_bug.cgi?id=102438

Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-12-05
Reviewed by Xan Lopez.

Source/WebKit/gtk:

In getPluginInfo, outPlugins is resized to plugins.size and then,
plugins are appended to it. So at the end, outPlugins will be twice
too large, and first half will contain null objects. As outPlugins
size is 0 when calling getPluginInfo, we don't need to resize it.

  • WebCoreSupport/PlatformStrategiesGtk.cpp:

(PlatformStrategiesGtk::getPluginInfo):

LayoutTests:

Add a test to check that navigator.plugins only contain valid plugin
objects.

  • plugins/navigator-plugins-expected.txt: Added.
  • plugins/navigator-plugins.html: Added.
  • plugins/script-tests/navigator-plugins.js: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r136692 r136697  
     12012-12-05  Arnaud Renevier  <a.renevier@sisa.samsung.com>
     2
     3        [Gtk] navigator.plugins contains too many plugin entries. First one are garbages
     4        https://bugs.webkit.org/show_bug.cgi?id=102438
     5
     6        Reviewed by Xan Lopez.
     7
     8        Add a test to check that navigator.plugins only contain valid plugin
     9        objects.
     10
     11        * plugins/navigator-plugins-expected.txt: Added.
     12        * plugins/navigator-plugins.html: Added.
     13        * plugins/script-tests/navigator-plugins.js: Added.
     14
    1152012-12-05  Zan Dobersek  <zandobersek@gmail.com>
    216
  • trunk/Source/WebKit/gtk/ChangeLog

    r136494 r136697  
     12012-12-05  Arnaud Renevier  <a.renevier@sisa.samsung.com>
     2
     3        [Gtk] navigator.plugins contains too many plugin entries. First one are garbages
     4        https://bugs.webkit.org/show_bug.cgi?id=102438
     5
     6        Reviewed by Xan Lopez.
     7
     8        In getPluginInfo, outPlugins is resized to plugins.size and then,
     9        plugins are appended to it. So at the end, outPlugins will be twice
     10        too large, and first half will contain null objects. As outPlugins
     11        size is 0 when calling getPluginInfo, we don't need to resize it.
     12
     13        * WebCoreSupport/PlatformStrategiesGtk.cpp:
     14        (PlatformStrategiesGtk::getPluginInfo):
     15
    1162012-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp

    r136197 r136697  
    131131    PluginDatabase* database = PluginDatabase::installedPlugins();
    132132    const Vector<PluginPackage*> &plugins = database->plugins();
    133     outPlugins.resize(plugins.size());
    134133
    135134    for (size_t i = 0; i < plugins.size(); ++i) {
Note: See TracChangeset for help on using the changeset viewer.