Closed
Bug 1047145
Opened 10 years ago
Closed 10 years ago
Implement Shumway ExternalInterface
Categories
(Firefox Graveyard :: Shumway, defect, P1)
Firefox Graveyard
Shumway
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: cpeterson, Assigned: yury)
References
Details
No description provided.
Updated•10 years ago
|
QA Contact: mwobensmith
Reporter | ||
Comment 1•10 years ago
|
||
We can defer ExternalInterface support from M2 to a later milestone because Yury says the most common use cases for ExternalInterface are clipboard and document.location, which we don't need yet.
Assignee | ||
Comment 2•10 years ago
|
||
Last good revision: 82df3654cd80 (2014-07-23)
First bad revision: a91ec42d6a9c (2014-07-24)
Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=82df3654cd80&tochange=a91ec42d6a9c
Assignee | ||
Comment 3•10 years ago
|
||
Too many revisions were skipped during bisecting, but possible bug that broke Shumway's external interface functionality could be bug 742444.
Right now we setup a sandbox and running script the following way (see also [1]):
wrappedWindow.__flash__toXML = function __flash__toXML(obj) {
...
};
...
var sandbox = new Cu.Sandbox(wrappedWindow, {sandboxPrototype: wrappedWindow});
wrappedWindow.__flash__eval = function (evalInSandbox, sandbox, expr) {
return evalInSandbox(expr, sandbox);
}.bind(wrappedWindow, Cu.evalInSandbox, sandbox);
When __flash__eval('__flash__toXML(0)') is executed, after bug 742444 (?) landing, the code fails: it cannot find __flash__toXML. Bobby, what will be the right way to produce the same effect as in earliest versions of FF?
Thanks
[1] http://mxr.mozilla.org/mozilla-central/source/browser/extensions/shumway/content/ShumwayStreamConverter.jsm#708
Flags: needinfo?(bobbyholley)
Comment 4•10 years ago
|
||
This seems overly-complicated. How about:
wrappedWindow.__flash__toXML = function __flash__toXML(obj) { ... };
var sandbox = new Cu.Sandbox(wrappedWindow, {sandboxPrototype: wrappedWindow});
wrappedWindow.__flash__eval = sandbox.eval;
Flags: needinfo?(bobbyholley)
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #4)
> This seems overly-complicated. How about:
> var sandbox = new Cu.Sandbox(wrappedWindow, {sandboxPrototype:
> wrappedWindow});
> wrappedWindow.__flash__eval = sandbox.eval;
Does not help: returns undefined (and I cannot receive any other feedback).
Comment 6•10 years ago
|
||
Does the flash sandbox need any sort of security protections when interacting with the content? If not, you should probably add { wantXrays: false } to the sandbox options (and we _do_ need security protections, you should be using an nsExpandedPrincipal, and passing [wrappedWindow] instead of wrappedWindow).
Regardless of all of that though, the snippet from comment 4 should work. If it doesn't, you'll either need to debug it, or put together a reduced testcase that I can look at.
Assignee | ||
Comment 7•10 years ago
|
||
Looks like you are right, the previous code can be simplified and used without Sandbox usage, see https://github.com/yurydelendik/shumway/commit/7e0957fa3234250cd6c3d53bef240fddc380551d
Reporter | ||
Updated•10 years ago
|
Priority: -- → P2
Reporter | ||
Comment 8•10 years ago
|
||
Till says ExternalInterface is both really close to working and mandatory for M3.
Priority: P2 → P1
Assignee | ||
Comment 9•10 years ago
|
||
Fixed by https://github.com/mozilla/shumway/pull/1724 and https://github.com/mozilla/shumway/pull/1748
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 10•10 years ago
|
||
Looks great for AVM2. \o/
AVM1, however, works only in the outbound, SWF-to-JS case. The inbound stuff doesn't appear to be working.
Examples for both:
http://people.mozilla.org/~mwobensmith/flash/external_interface/external_interface_avm1.html
http://people.mozilla.org/~mwobensmith/flash/external_interface/external_interface_avm2.html
Please let me know if I can help.
Assignee | ||
Comment 11•10 years ago
|
||
Currently we are using the same class for AVM1 as for AVM2, but apparently they have different interfaces and method signatures (per http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001037.html). We probably want to clone this bug for AS2.
Comment 12•10 years ago
|
||
Fixed. Verified with today's add-on.
At some point, we'll need to do a deeper test pass on ExternalInterface, but basic functionality is there.
Status: RESOLVED → VERIFIED
Updated•9 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•