David Benjamin
f53bd9084c
Remove some unused functions from rpc.c
...
Quiet some gcc warnings.
2011-03-30 20:25:35 -04:00
David Benjamin
c8ac2d10a0
Make unrecognized arguments fatal
...
Sorry, everyone. You all are passing arguments to configure that this
poor script is not understand. It's better that you actually notice your
mistakes.
Hopefully this'll eventually switch to some saner buildsystem. Maybe
scons since it understands multiple environments.
2011-03-30 20:25:35 -04:00
David Benjamin
c8b2fee6e4
Check for --help/-h before running the checks
...
Otherwise you don't know what option to pass to fix the darn things.
2011-03-30 20:25:35 -04:00
David Benjamin
db2245075a
Add a .gitignore file
2011-03-30 17:12:19 -04:00
David Benjamin
9b1b1add27
Drop some unnecessary LDFLAGS_32
...
They get pulled in at the front of each link rule anyway.
2011-03-30 17:04:46 -04:00
David Benjamin
928c989fe7
Support a --xid argument in the player for XEmbeding into a program
...
Patch from Fedora, modified to cleanup whitespace and refactored
considerably.
2011-03-30 16:49:49 -04:00
David Benjamin
30a20bd425
Use pkg-config to detect X11
...
The ad-hoc code was breaking Debian/Ubuntu multiarch.
2011-03-30 16:11:31 -04:00
David Benjamin
1b69cc2220
Advertise the minimum of plugin and thunking layer versions
...
We don't want to advertise a higher version number to the browser than
the plugin actually supports.
2011-03-30 15:55:30 -04:00
David Benjamin
609e50ed93
Implement NPN_ScheduleTimer and bump NPAPI version
...
NPN_ScheduleTimer (and NPN_UnscheduleTimer) are the only things that
could be relevant out of version 23. We also get version 24, because
it's just a variable.
2011-03-30 13:37:43 -04:00
David Benjamin
5d178b09f2
Avoid a crash if NPN_GetAuthenticationInfo fails on the wrapper
2011-03-30 13:32:59 -04:00
David Benjamin
f10221e0dc
Use thread-safe reference counting in PluginInstance
...
The refcount may be increased off the main thread.
2011-03-30 13:10:45 -04:00
David Benjamin
cf20a627d9
Fix up bundled glib headers
...
The prototypes for g_atomic_int_* are messed up. All the gints are
volatile.
2011-03-30 13:01:28 -04:00
David Benjamin
83eafb8fd7
A little more type safety with AsyncCall
...
There's not much point in void* here.
2011-03-30 10:36:40 -04:00
David Benjamin
d22bba006c
Update the README file somewhat to reflect the new world order
2011-03-29 23:55:06 -04:00
David Benjamin
8bdb601190
Include npw-malloc.h in npw-malloc.c
...
So that the attribute_hiddens don't get lost. No we finally stop
exporting extra symbols; just NP_* and NPW_Plugin.
2011-03-29 13:15:37 -04:00
David Benjamin
418551ca7f
Implement NPN_GetAuthenticationInfo
...
Tested with custom plugin in Firefox. We can now bump version all the
way up to 22; NPVERS_HAS_PRIVATE_MODE is just a variable. (The Cocoa
events one conceivably applies as it's worth implementing
NPN_ScheduleTimer.)
2011-03-29 13:06:09 -04:00
David Benjamin
1645593b7f
Add NPW_ReallocData for sanity
...
We have to reallocate data with NPN_MemAlloc a lot.
2011-03-29 13:06:09 -04:00
David Benjamin
c9cee779bb
Check if the browser provides NPN_Enumerate and NPN_Construct
...
It may be worth exchanging a list of capabilities in plugin
initialization in case anyone tries to condition on the existence of a
hook.
2011-03-29 13:06:09 -04:00
David Benjamin
518ab2e413
Hide a ton of symbols that shouldn't be exported
...
Still not catching all of them. This really should just be compiled with
-fvisilibilty=hidden and friends.
2011-03-29 13:06:09 -04:00
David Benjamin
0a65366e4b
Wrap NPN_GetValueForURL and NPN_SetValueForURL
...
Debug code does not print value because they are not guaranteed to be
NULL-terminated. (Mozilla, in fact, does not do so.) Not going to bump
NPAPI version just yet; still need to implement
NPN_GetAuthenticationInfo.
2011-03-28 21:13:23 -04:00
David Benjamin
46b8a15f9e
Fix a couple of memory problems in NPN_Enumerate
...
Why doesn't the RPC system just allocate everything with NPN_MemAlloc?
Whose bright idea was that?
2011-03-28 20:57:37 -04:00
David Benjamin
94e7a435bc
Add RPC method values for everything we're missing
...
Because I really don't want to renumber those milestone comments more
than once.
2011-03-28 20:57:36 -04:00
David Benjamin
11e0db8e74
Mark some functions static that I forgot to
...
Also a missing comment to be more consistent.
2011-03-28 20:57:36 -04:00
David Benjamin
e864711a66
Don't leak NPPVformValue memory on the plugin side
2011-03-28 20:57:36 -04:00
David Benjamin
0773ca7525
Implement string_of_NPNURLVariable
2011-03-28 20:57:36 -04:00
David Benjamin
0b41c794e5
Bump NPAPI version to 20
...
We get version 20 for free; it only added some variables.
2011-03-28 10:18:37 -04:00
David Benjamin
b4cc0ccc7c
Implement NPN_PluginThreadAsyncCall
...
We specifically do /not/ do the thread check here as it's meant for
scheduling. Tested with embedded-emacs.
2011-03-26 02:14:27 -04:00
David Benjamin
311d68266e
Implement NPN_Construct
...
Again, not yet tested, but it's the same interface as NPN_InvokeDefault.
2011-03-26 02:14:27 -04:00
David Benjamin
1e5c5df986
Fix a typo in NPN_InvokeDefault debug message
2011-03-26 02:14:27 -04:00
David Benjamin
17846fe51d
Support the construct hook on NPClass
...
Not yet tested, but the signature is identical to invokeDefault.
2011-03-26 02:14:27 -04:00
David Benjamin
51cf8ba27f
Hook NPN_Enumerate and update NPAPI version appropriately
...
Tested with custom plugin, both enumerating a native object and a plugin
object.
2011-03-26 02:14:27 -04:00
David Benjamin
71b03630a4
Support the enumerate hook on NPClass
...
Update NPClass versions as appropriate. Tested in Mozilla Firefox.
2011-03-26 02:14:26 -04:00
David Benjamin
b776441a05
Support browser-supplied NPPluginFuncs smaller than what we expect
...
Just copy the prefix the browser has.
2011-03-26 02:14:26 -04:00
David Benjamin
7e4ab8e118
Support all the new variables added
2011-03-26 02:14:26 -04:00
David Benjamin
eb368e0cf9
Use long instead of NPBool
...
Although NPAPI is kind enough to provide an NPBool,
NPNVSupportsXEmbedBool is actually a PRBool. Ugh.
2011-03-26 02:14:26 -04:00
David Benjamin
5a4b67ca8c
Freeze npplayer's NPAPI version at what it used to be
...
I suspect it actually wants to be 17, since that's what NPW_VERSION
says. In any case, it shares no code with the viewer and wrapper, and it
likely will not work as we keep pushing the NPAPI headers ahead.
2011-03-26 02:14:26 -04:00
David Benjamin
ca63d22a4c
Pull over a new set of NPAPI headers from npapi-sdk
...
From http://code.google.com/p/npapi-sdk/ . Adjust the code to compile
with the new version.
2011-03-26 02:14:26 -04:00
David Benjamin
36a9135d24
Set svndate in the spec file back to DATE
...
I guess that gets set automatically in the resulting srpm or something?
2011-03-26 02:13:47 -04:00
David Benjamin
d8cfb62dfb
Make this build on platforms with stack protection
...
Adapted from a Gentoo patch. I guess this actually builds now, but it
may be better to have a less hacky solution.
2011-03-25 00:13:07 -04:00
David Benjamin
1f8b9521b8
Properly clean up NPSavedData
...
No one uses it, but we may as well handle them right. Always allocate
with NPN_MemAlloc in case we pass them to the browser. Free them when
unused.
2011-03-25 00:13:07 -04:00
David Benjamin
1fc19f41e6
Delay calls to NPP_Destroy when the plugin instance is on the stack
...
Otherwise, from the plugin's perspective, NPN_InvalidateRect results in
the plugin instance exploding. One can hardly blame Adobe that Flash
crashes in this situation.
Unfortunately, because we attempt to speak synchronous NPAPI on both
ends and there's the additional SYNC mechanism forcing a particular
order, we cannot reorder the calls. As a result, when NPP_Destroy must
be delayed, we lie to the browser and actually destroy the plugin later.
This means, however, that any NPSavedData provided by the plugin is
ignored. In this case, a warning is emitted.
We do a slightly more conservative check and delay whenever we have any
invoke on the call stack, be it this instance or any other. This is
better than checking the refcount because any NPObjectInfo will hold a
reference.
2011-03-25 00:13:06 -04:00
David Benjamin
b6c8eb5e1d
Make delayed_calls_process re-entrant
...
Otherwise we can get into a race; while we call g_NPN_ReleaseObject_Now,
the wrapper is calling NPP_Destroy. As a result, delayed_calls_process
gets called a second time and we re-enter the function, causing a
double-free.
2011-03-25 00:13:06 -04:00
David Benjamin
ad617680db
Fedora patch: add a NULL check
2011-03-25 00:13:06 -04:00
David Benjamin
32e7e3e662
Debian patch: Work around client-side windows in Flash
2011-03-25 00:13:06 -04:00
David Benjamin
6ac27657df
Fedora patch: Fix NPIdentifier marshalling
2011-03-25 00:13:06 -04:00
David Benjamin
91cc2f4081
Fedora patch: silence some debug spew
...
Should only be printed in debug builds.
2011-03-25 00:13:06 -04:00
David Benjamin
e92fa4d6f0
Debian patch: Fix the abstract for the '-u' option.
...
-- Rob Andrews <rob@choralone.org> Sun, 02 Sep 2007 11:58:27 +0100
2011-03-25 00:13:06 -04:00
David Benjamin
70248136a0
Debian patch: remove bashisms
...
Anti-bashism patch inherited from Ubuntu.
Author: Anders Kaseorg <anders@kaseorg.com>
-- Rob Andrews <rob@choralone.org> Thu, 28 Jun 2007 18:08:54 +0100
2011-03-25 00:13:06 -04:00
David Benjamin
b15fb20458
nspluginwrapper-1.3.0
...
Taken from Debian orig.tar.gz file.
2011-03-25 00:13:06 -04:00
David Benjamin
910986a89b
nspluginwrapper-1.2.2
...
Taken from Debian orig.tar.gz file.
2011-03-25 00:13:02 -04:00