Plugin-container and out-of-process plugins: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(→‎Firefox 4: updated for Firefox 4 and above)
(→‎Firefox 4 and above: made subsections for Mac OS and Windows/Linux)
Line 44: Line 44:
''This applies to  Firefox pre-release builds (3.7a1pre and above) and Firefox 4 Beta as well as Firefox 4.0 and later releases. For more information about Firefox test builds, see [[Testing pre-release versions]].''
''This applies to  Firefox pre-release builds (3.7a1pre and above) and Firefox 4 Beta as well as Firefox 4.0 and later releases. For more information about Firefox test builds, see [[Testing pre-release versions]].''


'''Note:'''  On Mac OS (10.6 or above), in Firefox 4 Beta releases previous to Beta 7,  only certain plugins  (Flash Player and Java) were "whitelisted" to run out-of-process  by default.  These plugins were set to "true" in the preference '''dom.ipc.plugins.enabled.''<filename>'''''.  Starting in Firefox 4 Beta 7,  the following preferences are set to "true" , by default:
====Mac OS====
On Mac OS (10.6 or above), in Firefox 4 Beta releases previous to Beta 7,  only certain plugins  (Flash Player and Java) were "whitelisted" to run out-of-process  by default.  These plugins were set to "true" in the preference '''dom.ipc.plugins.enabled.''<filename>'''''.   


Starting in Firefox 4 Beta 7,  the following preferences are set to "true" , by default:
*dom.ipc.plugins.enabled.i386.flash player.plugin
*dom.ipc.plugins.enabled.i386.flash player.plugin
*dom.ipc.plugins.enabled.i386.javaplugin2_npapi.plugin
*dom.ipc.plugins.enabled.i386.javaplugin2_npapi.plugin
Line 52: Line 54:
'''Important:''' When Firefox 4 Beta 7 is run in 64-bit mode (the default for 64-bit Mac OS 10.6) all plugins are set to run out-of-process via the preference '''dom.ipc.plugins.enabled.x86_64''', which is set to "true" by default.  If you change this preference to "false" when running in 64-bit mode, some or all of your plugins  (e.g, Flash)  will not work.  Note that not all 32-bit plugins will run on Firefox 4 in 64-bit mode.  Only  plugins that use the Cocoa version of NPAPI will load; any i386 (32-bit) plugin still using Carbon NPAPI won’t load (e.g., Flash plugins  previous to version 10.1 will not work when Firefox 4 is run in 64-bit mode).  [http://boomswaggerboom.wordpress.com/2010/11/10/firefox-4-for-mac-os-x-under-the-hood/] [http://mxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#932]  To troubleshoot plugins in Firefox 4.0 Beta 7 and later, set Firefox to run in 32-bit mode (close Firefox, control-click the Firefox.app icon, select "Get Info", and then check the box, "Open in 32-bit mode") before disabling crash protection.
'''Important:''' When Firefox 4 Beta 7 is run in 64-bit mode (the default for 64-bit Mac OS 10.6) all plugins are set to run out-of-process via the preference '''dom.ipc.plugins.enabled.x86_64''', which is set to "true" by default.  If you change this preference to "false" when running in 64-bit mode, some or all of your plugins  (e.g, Flash)  will not work.  Note that not all 32-bit plugins will run on Firefox 4 in 64-bit mode.  Only  plugins that use the Cocoa version of NPAPI will load; any i386 (32-bit) plugin still using Carbon NPAPI won’t load (e.g., Flash plugins  previous to version 10.1 will not work when Firefox 4 is run in 64-bit mode).  [http://boomswaggerboom.wordpress.com/2010/11/10/firefox-4-for-mac-os-x-under-the-hood/] [http://mxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#932]  To troubleshoot plugins in Firefox 4.0 Beta 7 and later, set Firefox to run in 32-bit mode (close Firefox, control-click the Firefox.app icon, select "Get Info", and then check the box, "Open in 32-bit mode") before disabling crash protection.


'''On Windows and Linux,''' the OOPP crash protection feature is enabled for all plugins and the preference '''dom.ipc.plugins.enabled'''  is set to '''true''', by default.  To disable crash protection,  toggle this  preference  from "true" to '''false'''.  If you only want to disable certain plugins from running "out-of-process",  you can  "blacklist" each plugin by creating a new boolean preference  '''dom.ipc.plugins.enabled.''<filename>'''''  and setting its value to '''false'''.  Filenames of specific plugins can be found in [[about:plugins]]  and should be entered in lower-case.  For example,  to disable OOPP for the Adobe Flash plugin on Windows, create a new boolean preference named  '''dom.ipc.plugins.enabled.npswf32.dll''' and set its value to '''false'''.  [https://bugzilla.mozilla.org/show_bug.cgi?id=539063]   
====Windows and Linux====
In Firefox 4 and above on Windows and Linux, the OOPP crash protection feature is enabled for all plugins and the preference '''dom.ipc.plugins.enabled'''  is set to '''true''', by default.  To disable crash protection,  toggle this  preference  from "true" to '''false'''.  If you only want to disable certain plugins from running "out-of-process",  you can  "blacklist" each plugin by creating a new boolean preference  '''dom.ipc.plugins.enabled.''<filename>'''''  and setting its value to '''false'''.  Filenames of specific plugins can be found in [[about:plugins]]  and should be entered in lower-case.  For example,  to disable OOPP for the Adobe Flash plugin on Windows, create a new boolean preference named  '''dom.ipc.plugins.enabled.npswf32.dll''' and set its value to '''false'''.  [https://bugzilla.mozilla.org/show_bug.cgi?id=539063]   


'''Note:''' Starting in trunk builds after 10-15-2010, a new preference '''dom.ipc.plugins.java.enabled''' has been added.  [http://hg.mozilla.org/mozilla-central/rev/6bef1538745f]  On Windows builds, this preference will be set to '''false''' by default, due to stability issues when OOPP for Java is enabled ([https://bugzilla.mozilla.org/show_bug.cgi?id=603417 bug 603417]).
'''Note:''' Starting in trunk builds after 10-15-2010, a new preference '''dom.ipc.plugins.java.enabled''' has been added.  [http://hg.mozilla.org/mozilla-central/rev/6bef1538745f]  On Windows builds, this preference will be set to '''false''' by default, due to stability issues when OOPP for Java is enabled ([https://bugzilla.mozilla.org/show_bug.cgi?id=603417 bug 603417]).

Revision as of 20:14, 13 August 2011

This article applies to Firefox 3.6.4 and above

Crash protection

Starting in Firefox 3.6.4 on Windows and Linux, a new crash protection feature isolates certain plugins from the browser process and sets those plugins to each run in a separate plugin-container process. Before this new "out-of-process plugins" ("OOPP") crash protection feature, a problem with a plugin (e.g, Adobe Flash) would often cause the entire Firefox browser to crash. When an "out-of-process plugin" stops working, Firefox can remain running and just the portions of a webpage that need the plugin will be disabled (i.e., missing the plugin content).

In Firefox 3.6 releases since Firefox 3.6.4, the crash protection feature that sets plugins to run in a separate process is enabled for specified plugins only. By default, the plugins enabled to run "out-of-process" are the NPAPI test plugin, Adobe Flash, Apple QuickTime (Windows) and Microsoft Silverlight (Windows). [1]

These "whitelisted" plugins in Firefox 3.6 releases (Firefox 3.6.4 and above) are each specified in a separate dom.ipc.plugins.enabled.<filename> preference that is set to true for each OOPP-enabled plugin. (Crash protection is disabled by default for all other plugins so, by default, the dom.ipc.plugins.enabled preference that permits all plugins to run "out-of process" is set to false.)

Note: This new crash protection feature will be available for Mac OS (10.6 or higher) in Firefox 4. [2] [3]

Plugin-container

An out-of-process plugin runs in a separate process named "plugin-container" ("plugin-container.exe" on Windows). For each plugin for which the "OOPP" crash protection feature is enabled, a separate plugin-container process will be started when you first visit a webpage that evokes that plugin. When you exit Firefox, those plugin-container processes will terminate.

Important: Your firewall or other security software may block plugin-container and prevent a plugin from working. If you are asked for permission to allow plugin-container access to the Internet, you should allow it. If you previously denied access, you should change your security software program settings to allow plugin-container. [4] [5] [6] [7] [8]

Plugin error dialog

Firefox will automatically use an installed and enabled plugin for embedded webpage content, such as Flash videos on YouTube. If the plugin crashes or if Firefox detects that the plugin has stopped responding, the plugin will terminate and you will see an error dialog on the webpage, instead of the content that uses the plugin. To send a crash report to Mozilla, click the Send crash report link in the error dialog.

Disabling crash protection

In some cases you may want to disable the "out-of-process plugins" (OOPP) crash protection feature; e.g., to troubleshoot problems that first appeared in Firefox 3.6.4 or above. To disable crash protection, go to about:config and set all dom.ipc.plugins.enabled.* preferences to false. This will prevent the "plugin-container" process from running and all plugins will run within the Firefox browser process. [9] [10]

For example, to disable crash protection in Firefox 3.6 releases (3.6.4 and above) type about:config in the Location Bar (address bar) and press the Enter key. When the list of preferences appears, find the following preferences. (Each preference specifies an "out-of-process" plugin by its filename; the name shown in parentheses is for informational purposes only):

On Linux:

  • dom.ipc.plugins.enabled.libflashplayer.so (Adobe Flash)
  • dom.ipc.plugins.enabled.libnptest.so (NPAPI test plugin)

On Windows:

  • dom.ipc.plugins.enabled.npctrl.dll (Microsoft Silverlight)
  • dom.ipc.plugins.enabled.npqtplugin.dll (Apple QuickTime)
  • dom.ipc.plugins.enabled.npswf32.dll (Adobe Flash)
  • dom.ipc.plugins.enabled.nptest.dll (NPAPI test plugin)

Toggle (double-click) each preference to change the value from "true" to false, as shown below on Windows.

Note: In Firefox 3.6 releases (3.6.4 and above) the preference dom.ipc.plugins.enabled is already set to "false", by default.

Firefox 4 and above

This applies to Firefox pre-release builds (3.7a1pre and above) and Firefox 4 Beta as well as Firefox 4.0 and later releases. For more information about Firefox test builds, see Testing pre-release versions.

Mac OS

On Mac OS (10.6 or above), in Firefox 4 Beta releases previous to Beta 7, only certain plugins (Flash Player and Java) were "whitelisted" to run out-of-process by default. These plugins were set to "true" in the preference dom.ipc.plugins.enabled.<filename>.

Starting in Firefox 4 Beta 7, the following preferences are set to "true" , by default:

  • dom.ipc.plugins.enabled.i386.flash player.plugin
  • dom.ipc.plugins.enabled.i386.javaplugin2_npapi.plugin
  • dom.ipc.plugins.enabled.x86_64

Important: When Firefox 4 Beta 7 is run in 64-bit mode (the default for 64-bit Mac OS 10.6) all plugins are set to run out-of-process via the preference dom.ipc.plugins.enabled.x86_64, which is set to "true" by default. If you change this preference to "false" when running in 64-bit mode, some or all of your plugins (e.g, Flash) will not work. Note that not all 32-bit plugins will run on Firefox 4 in 64-bit mode. Only plugins that use the Cocoa version of NPAPI will load; any i386 (32-bit) plugin still using Carbon NPAPI won’t load (e.g., Flash plugins previous to version 10.1 will not work when Firefox 4 is run in 64-bit mode). [11] [12] To troubleshoot plugins in Firefox 4.0 Beta 7 and later, set Firefox to run in 32-bit mode (close Firefox, control-click the Firefox.app icon, select "Get Info", and then check the box, "Open in 32-bit mode") before disabling crash protection.

Windows and Linux

In Firefox 4 and above on Windows and Linux, the OOPP crash protection feature is enabled for all plugins and the preference dom.ipc.plugins.enabled is set to true, by default. To disable crash protection, toggle this preference from "true" to false. If you only want to disable certain plugins from running "out-of-process", you can "blacklist" each plugin by creating a new boolean preference dom.ipc.plugins.enabled.<filename> and setting its value to false. Filenames of specific plugins can be found in about:plugins and should be entered in lower-case. For example, to disable OOPP for the Adobe Flash plugin on Windows, create a new boolean preference named dom.ipc.plugins.enabled.npswf32.dll and set its value to false. [13]

Note: Starting in trunk builds after 10-15-2010, a new preference dom.ipc.plugins.java.enabled has been added. [14] On Windows builds, this preference will be set to false by default, due to stability issues when OOPP for Java is enabled (bug 603417).

Plugin hang detector

In Firefox 3.6.4 and above, a plugin hang detector determines when an out-of-process plugin or plugin script has stopped responding, so that Firefox can terminate the plugin. The time period that must pass before the plugin is assumed to be locked up is set in the preference dom.ipc.plugins.timeoutSecs (the default is 45 seconds in Firefox 3.6.6). [15] When Firefox terminates a plugin that is no longer responding, you will see the "plugin has crashed" error dialog shown above. To prevent Firefox from terminating plugins it considers non-responsive, set dom.ipc.plugins.timeoutSecs to -1 in about:config. This disables the plugin hang detector but does not disable OOPP or stop "plugin-container" from running; to do that, you must set the dom.ipc.plugins.enabled.* preferences to "false" (see above).

See also

External links

Related bug reports