On Thu, Dec 10, 2009 at 4:03 PM, Avi Drissman <[email protected]> wrote:
> Andy sent me a CL for review about an extension crashing ( > http://crbug.com/29584). Turns out the cause was a failure to load a > Windows .dll on the Mac. > > Huh? Then I went to look at the docs ( > http://code.google.com/chrome/extensions/npapi.html): > > { > "name": "My extension", > ... > *"plugins": [ > { "path": "content_plugin.dll", "public": true }, > { "path": "extension_plugin.dll" } > > > ]*, > ... > } > > Are you kidding me? How can we get away with not specifying what platform > the extension will run on? (Hint: we can't.) > I believe the extension author can make this work - the .dll is not loaded until the <embed> tag is processed, so a properly written extension could sniff the host OS and then dynamically add an <embed> tag pointing at the correct binary. Simply specifying the .dll in the manifest is not sufficient to trigger a load attempt. In general extensions should _not_ use NPAPI and we should be discouraging it as actively as possible but some things are impossible to do without them, unfortunately. - James > If we had something like: > > "plugins": { > "mac": ... > "win": ... > "linux": ... > } > > then at least we could warn on the extensions website that a given > extension is only compatible with a certain platform. On a load attempt we > could know that the extension requires a certain native library and fail to > load it with a real user-friendly warning. > > And developers could *make* extensions that are cross-platform compatible. > > Today? > - We can't tell in advance what platforms an extensions runs on, so we > can't warn the user (either on the extensions site or in the app) > - The developer has no way of creating a cross-platform extension. > > This is a *really* bad situation we've created. We need to get a new > syntax out for extensions to fix this, and soon, before world-breaking > becomes prohibitively expensive. > > Avi > > -- > Chromium Developers mailing list: [email protected] > View archives, change email options, or unsubscribe: > http://groups.google.com/group/chromium-dev -- Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev
