Saves a bit of effort, and simplifies capability passing. We lose the
npruntime logic, but we may as well unconditionally initialize the
bridge. It's cheap and every browser should have it by now.
This reverts commit 1b259a8119. If you
call a function from Flash that ends up opening an alert, the call
blocks until the user closes the alert, and the call eventually times
out. A 30 second timeout isn't much better, but is harder to trigger
accidentally, whereas it's not difficult to trigger a 10 second timeout
on accident.
See bug #24.
For obnoxious reasons, NPN_CreateObject needs to know if an object is a
proxy before its proxy fields have been initialized. We can't assume
proxy_id == 0 means not a proxy. Valgrind gets upset.
Saves a little bit of code. Also some of the enumerate code was bogus.
Also actually reallocate NPClass::Enumerate array. Oops, must have
missed that one.
What's this about? Both Firefox and Chrome make a copy of it. (In fact,
Firefox apparently doesn't implement it for their out-of-process plugin
code. But their old codepath handles it fine.
Maintain and send the owning NPP for every viewer-owned NPObject. Use
this as the NPP when creating proxy objects. Also send an explicit
NPObject type so we don't infer which side owns it from our
dictionaries.
This fixes the Firefox thing properly.
All received NPObjects must be released, either directly or by releasing
the NPVariant. Verified that visiting and leaving pages on YouTube and
Hulu do not leak stubs and proxies.
Most of the credit goes to Chromium as this is the exact same design.
The main advantage is that we should no longer be leaking NPObject stubs
left and right.
Also update our code to support this variable and the change in
capitalization of NPPVsupportsAdvancedKeyHandling. No NPAPI version bump
or additional hooks are required to support DOM cursor control.
This reverts commit 1fc19f41e6. With the
two processes kept mutually exclusive, a delayed NPP_Destroy is no
longer necessary. In fact, it doesn't actually work because returning
from NPP_Destroy (to the browser) allows it to release X11 resources
that the plugin holds on to. See bug #20.
Surround dispatches with a SYNC/SYNC_END pair, but only if the dispatch
does anything. check and prepare hooks do not get run synchronized for
efficiency. We assume plugins do not violate the GSource API and, say,
modify X objects in those hooks.