Closed Bug 73060 Opened 23 years ago Closed 23 years ago

Current pluginhost implementation need NewEmbededPluginStream return true

Categories

(Core Graveyard :: Plug-ins, defect)

x86
Windows NT
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 76594

People

(Reporter: wli, Assigned: serhunt)

Details

When I tried to use nsIDocShell::LoadStream function to load a html page, I 
accounted a problem. In my page, there is an <embed> object which isn't Java 
Plugin. I found that the object cannot be shown just as I loaded this page 
using loadURL function. The reason is because of the following code snippet I 
got from nsPluginHostImpl.cpp:
.
.
.
      // don't make an initial steam if it's a java applet
      if(!aMimeType || 
         (PL_strcasecmp(aMimeType, "application/x-java-vm") != 0 && 
          PL_strcasecmp(aMimeType, "application/x-java-applet") != 0))
        rv = NewEmbededPluginStream(aURL, nsnull, instance);
.
.
.

When pluginhost creates the plugin, it will tried to create a stream using 
provided URL. And the result rv will be returned. In my case, when I used
loadStream, I didn't provide URI parameter. So NewEmbededPluginStream will 
return error code and gecko layout engine will think initialization of plugin
failed and not show the plugin object.
Another interesting discovery is that when I load the page again, the plugin
will be shown because pluginhost will always return NS_OK whatever 
NewEmbededPluginStream returns.
The problem is that why pluginhost needs NewEmbededPluginStream must return 
true. I think pluginhost can handle it more smoothly.

Thanks, Wen
Status: UNCONFIRMED → NEW
Ever confirmed: true
Sorry. There are some typos in my lastest post.
1. When reloading the same page with plugin, pluginhost will try to find plugin 
instance from one cached stopped plugin list. So the executing path is kind of 
different from create a brand new plugin.
2. "I think pluginhost can handle it more smoothly" should be: "I think plugin 
instance can handle it more smoothly than pluginhost".

Thanks, Wen

*** This bug has been marked as a duplicate of 76594 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
mass duplicate verifications . For filtering purposes, pls use keywd
"massdupverification"

Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.