Closed Bug 382378 Opened 18 years ago Closed 17 years ago

Minefield: JS calls on JS-built flash-object fail [JavaScript Flash ExternalInterface]

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: jaroslav.zaruba, Assigned: Biesinger)

References

()

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a5pre) Gecko/20070527 Minefield/3.0a5pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a5pre) Gecko/20070527 Minefield/3.0a5pre

When a flash-object is created by static-markup JS calls work fine.
When it is built dynamically (JS + DOM-manipulation) JS calls on the flash-object fail whilst Flash->JS calls seem to work fine.
The test-case: http://bugs.sounds4u.net/Minefield/ExternalInterface/
(In FF2 everything works fine.)

Reproducible: Always

Steps to Reproduce:
1. using JS and DOM-API create a flash-object with some ExternalInterface functions
2. make a JS call on the flash-object
Actual Results:  
the flash ExternalInterface functions are not available so the JS-call ends up with an error

Expected Results:  
the flash functions exposed using ExternalInterface should work regardless whether the object has been spawned by a static markup or using JS + DOM-manipulation
contains XHTML-document, SWF file with an audioPlayer and 62kB mp3-sample
Jaroslav, your testcase doesn't seem to work, when I run it from my desktop. But I was able to reproduce the problem with the link you gave. Because it once worked as expected this could be a regression.
Regression range for this is http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=2005-09-21+09%3A00&maxdate=2005-09-22+00%3A00
Putting some people on the CC list (hopefully the right one is amongst them).
In that range, bug 1156 or bug 309534 are the most likely culprits, I think.
Component: General → Plug-ins
Keywords: regression
Product: Firefox → Core
QA Contact: general → plugins
> Jaroslav, your testcase doesn't seem to work, when I run it from my desktop.

I do apologize; I guess it must be accessed through a webserver (be it localhost or not), mea culpa.
But it doesn't matter as long as the URL works.
Attachment #266529 - Attachment description: test-case → test-case (probably must be accessed through a webserver)
(In reply to comment #3)
> In that range, bug 1156 or bug 309534 are the most likely culprits, I think.
>
OK thanks :) 

Actually, I should have probably looked at the actual patch before making that comment, rather than just the list of files - I think the patch for bug 309534 is pretty unlikely to have caused something like this.
Bug 1156 could lead to something like this, in theory...  Shouldn't have, though.

In any case, this being broken should block 1.9, in my opinion. Given that Ria can reproduce, confirming.  What version of Flash is having the problem?  Flash 9?  Or Flash 7?
Blocks: 1156
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9?
> What version of Flash is having the problem? Flash 9? Or Flash 7?

Flash 9: yes (bug occurs)
Flash 7: I don't know
biesi, do you have time to look into this?
Problem is also present with Flash 8.
Biesi, please have a look at this regression to see if it's from any of your patches.
Assignee: nobody → cbiesinger
Flags: blocking1.9? → blocking1.9+
OS: Windows 2000 → All
Hardware: PC → All
Target Milestone: --- → mozilla1.9 M9
Attached patch patch (obsolete) — Splinter Review
The plugin gets instantiated by onStartRequest, so we have to call this afterwards (note: the channel version of nsObjectFrame::Instantiate doesn't call this, although adding it there doesn't make a difference of course)
Attachment #274884 - Flags: superreview?(bzbarsky)
Attachment #274884 - Flags: review?(bzbarsky)
I'll add a comment to the TryNotifyContentObjectWrapper call:

  // We have to notify the wrapper here instead of right after Instantiate
  // because the plugin only gets instantiated by onStartRequest, not by
  // Instantiate.
Comment on attachment 274884 [details] [diff] [review]
patch

>Index: content/base/src/nsObjectLoadingContent.cpp
>+    } else if (mType == eType_Plugin) {

Add a comment here that calling OnStartRequest on the listener may have instantiated the plugin?  Though really, I would prefer this call happen in whatever code actually does the instantiation....

>+        frame->TrYNotifyContentObjectWrapper();

Lowercase "y"?

r+sr=bzbarsky, but again I'd prefer to put this code elsewhere.
Attachment #274884 - Flags: superreview?(bzbarsky)
Attachment #274884 - Flags: superreview+
Attachment #274884 - Flags: review?(bzbarsky)
Attachment #274884 - Flags: review+
There doesn't really seem to be a good place... the plugin stream listener peer isn't ideal either.
Attachment #274884 - Attachment is obsolete: true
Checking in content/base/src/nsObjectLoadingContent.cpp;
/cvsroot/mozilla/content/base/src/nsObjectLoadingContent.cpp,v  <--  nsObjectLoadingContent.cpp
new revision: 1.56; previous revision: 1.55
done
Checking in layout/generic/nsIObjectFrame.h;
/cvsroot/mozilla/layout/generic/nsIObjectFrame.h,v  <--  nsIObjectFrame.h
new revision: 1.13; previous revision: 1.12
done
Checking in layout/generic/nsObjectFrame.cpp;
/cvsroot/mozilla/layout/generic/nsObjectFrame.cpp,v  <--  nsObjectFrame.cpp
new revision: 1.610; previous revision: 1.609
done
Checking in layout/generic/nsObjectFrame.h;
/cvsroot/mozilla/layout/generic/nsObjectFrame.h,v  <--  nsObjectFrame.h
new revision: 1.68; previous revision: 1.67
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: