{"id":631,"date":"2010-03-03T10:45:42","date_gmt":"2010-03-03T14:45:42","guid":{"rendered":"http:\/\/benjamin.smedbergs.us\/blog\/?p=631"},"modified":"2010-03-03T10:55:18","modified_gmt":"2010-03-03T14:55:18","slug":"firefox-safe-from-plugin-crashes","status":"publish","type":"post","link":"https:\/\/benjamin.smedbergs.us\/blog\/2010-03-03\/firefox-safe-from-plugin-crashes\/","title":{"rendered":"Firefox, Safe From Plugin Crashes"},"content":{"rendered":"<p>Today we <a href=\"https:\/\/developer.mozilla.org\/devnews\/index.php\/2010\/03\/03\/mozilla-developer-preview-now-available-with-out-of-process-plugins\/\">released<\/a> the first Mozilla Developer Preview containing multi-process plugins. Firefox is now safe from plugin crashes, on Windows and Linux.<\/p>\n<p style=\"float: right; margin: 1em; max-width: 60%;\"><a href=\"http:\/\/blog.mozilla.com\/dolske\/2010\/02\/10\/no-big-whoop\/\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/people.mozilla.com\/~dolske\/blogimg\/crashcat.png\"><\/a><\/p>\n<h3>Where Do I Get It?<\/h3>\n<p style=\"font-size: larger\"><a href=\"http:\/\/www.mozilla.org\/projects\/firefox\/3.7a2\/releasenotes\/#download\">Here!<\/a><\/p>\n<h3>How Can I Help?<\/h3>\n<p>Warning: the developer preview is alpha-quality and may contain bugs. If you are willing to browse on the wild side, please <a href=\"http:\/\/www.mozilla.org\/projects\/firefox\/3.7a2\/releasenotes\/#download\">download<\/a> and use the preview build as your day-to-day browser. Visit web pages which use plugins. We have done a fair bit of testing with the most popular plugins such as Flash and Silverlight, but there are many less popular plugins which may not be tested at all. If you don&#8217;t know what plugins are installed, go to Tools \/ Add-Ons \/ Plugins.<\/p>\n<p>If you encounter any crashes, please make sure you submit the crash reporter and try to provide a detailed comment about what you were doing at the time of the crash.<\/p>\n<p>If you encounter any unexpected behavior, please <a href=\"https:\/\/bugzilla.mozilla.org\/enter_bug.cgi?product=Core&#038;component=Plug-ins\">file a bug<\/a>, including the following information:<\/p>\n<ul>\n<li>The website you were visiting\n<li>Plugin information copied from about:plugins\n<li>Expected and actual behavior\n<li>Whether the behavior is fixed when you change the IPC preference (see below).\n<\/ul>\n<h3>How Does It Work?<\/h3>\n<p>The Mozilla Developer Center has <a href=\"https:\/\/developer.mozilla.org\/en\/Plugins\/Multi-Process_Plugin_Architecture\">an article<\/a> describing the underlying architecture: there is a shim layer which acts like a plugin in the browser process and a browser in the plugin process. Function calls are translated into RPC messages passed between the two processes.<\/p>\n<p>One of the key pieces of technology we&#8217;ve developed to make message passing more reliable is <a href=\"https:\/\/developer.mozilla.org\/en\/IPDL\">IPDL<\/a>. IPDL is a language which precisely describes the messages that can be passed between processes, and allows developers to define a state machine and error handling conditions for messages and resources shared across processes. IPDL layers on top of an IPC stack that Mozilla copied from the Chromium codebase. For instance, <a href=\"http:\/\/mxr.mozilla.org\/mozilla-central\/source\/dom\/plugins\/PPluginInstance.ipdl\">this protocol<\/a> describes the messages associated with a plugin instance on a web page. Each message may be delivered asynchronously, synchronously, or with RPC semantics.<\/p>\n<h3>Common Questions<\/h3>\n<dl>\n<dt>What happens when a plugin crashes?<\/p>\n<dd>When a plugin crashes, the Mozilla crash reporter kicks in and submits the crash report to Mozilla. Then we replace the plugin display with the <a href=\"http:\/\/blog.mozilla.com\/dolske\/2010\/02\/10\/crashed-plugin-ui\/\">crashed-plugin UI<\/a>. When you reload the page, we restart the plugin process.<\/p>\n<dt>Why don&#8217;t you reload the plugin automatically?<\/p>\n<dd>We thought about this: however, web page scripts often have state associated with a plugin. If we reload the plugin without reloading the entire page, those scripts will have unexpected state and can get very confused. Overall, it causes fewer problems for the user to simply refresh the page.<\/p>\n<dt>What&#8217;s the name of the plugin process?<\/p>\n<dd>The name of the plugin process in the Windows task manager is mozilla-runtime.exe (mozilla-runtime on Linux).<\/p>\n<dt>Why is mozilla-runtime using so much memory?<\/p>\n<dd>In general, our automated tests show that Mozilla actually uses less overall memory than it did previously. However, there are some measurement issues which may cause problems: memory which is shared between the two processes, such as mapped memory segments and code, may be counted twice. The Chromium project has had <a href=\"http:\/\/blog.chromium.org\/2009\/08\/chromium-memory-usage.html\">similar problems<\/a> accurately measuring and presenting memory usage information. If there are particular pages or plugins which show a regression in memory usage, please file a bug!<\/p>\n<dt>What about Mac?<\/p>\n<dd>MacOS presents some unique challenges: the traditional drawing and interaction model for plugins is very difficult to do across processes. We are working on Mac support for multi-process plugins, and hope to have a preview of this work available soon.\n<\/dl>\n<h3>Preferences<\/h3>\n<p>Multi-process plugin behavior can be controlled from <a href=\"https:\/\/developer.mozilla.org\/En\/A_Brief_Guide_to_Mozilla_Preferences#Modifying_preferences\">preferences<\/a>:<\/p>\n<dl>\n<dt>dom.ipc.plugins.enabled.<var>filename<\/var><\/p>\n<dd>Each plugin can be controlled independently. For example, if Acrobat is causing problems, you can run it in-process by setting the pref <strong>dom.ipc.plugins.enabled.nppdf32.dll<\/strong> to <strong>false<\/strong>. The filename should be lower-case.<\/p>\n<dt>dom.ipc.plugins.enabled (true)<\/p>\n<dd>This controls the multi-process behavior for all plugins which don&#8217;t have a specific pref set as above.\n<\/dl>\n<p>After these preferences are changed the browser must be restarted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we released the first Mozilla Developer Preview containing multi-process plugins. Firefox is now safe from plugin crashes, on Windows and Linux. Where Do I Get It? Here! How Can I Help? Warning: the developer preview is alpha-quality and may contain bugs. If you are willing to browse on the wild side, please download and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-631","post","type-post","status-publish","format-standard","hentry","category-untagged"],"_links":{"self":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/comments?post=631"}],"version-history":[{"count":30,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/631\/revisions"}],"predecessor-version":[{"id":661,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/631\/revisions\/661"}],"wp:attachment":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/media?parent=631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/categories?post=631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/tags?post=631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}