IRC Log Viewer » #firebreath » 2011-09-13

IRC Nick Time (GMT-7) Message
gargle 02:09 hi all :)
futuristic 06:09 Hello there
is any one there?
I am the new guy to use FireBreath can some one help me
gargle 06:09 hi
perhaps i could help you
oups, too late
linearray 10:09 taxilian: dear smart_ptr demigod, when I need a pointer to an object without ownership (from the object being owned back to the owner), what do i use?
taxilian 10:09 I usually use a pointer :-P
but you could also use a weak_ptr
in some cases
linearray 10:09 i.e. fileset has a scoped_ptr to file, and I want a pointer from file back to fileset
taxilian 10:09 it depends on what you're trying to do
if your lifecycle is guaranteed (you know that the fileset will be around at least as long as the file) then you can use a regular pointer
if you don't know, then a weak_ptr
linearray 10:09 but I thought that only works when the pointee is managed by a shared_ptr
taxilian 10:09 it does
linearray 10:09 ok
taxilian 10:09 so if that is not the case, then you could use a shareable reference
Sajty 10:09 taxilian: I want to note, that here they wrote, that we should set NPPVpluginNeedsXEmbed. https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins
taxilian 10:09 (that's my name for the pattern)
Sajty: I'm pretty sure we are doing so
linearray 10:09 thing is, I don't really know what I would want the smart pointer to do.. it just feels dirty to use regular pointers :)
taxilian 10:09 lol. well, question then
can the file still be around after the fileset gets destroyed?
linearray 10:09 no
taxilian 10:09 then just use a normal pointer; anything else is overkill
and doesn't buy you anything
linearray 10:09 cool, thought so
but was unsure :)
taxilian 10:09 smart pointers are wonderful things, but using them just for the sake of using them is silly
you get overhead (not a ton, but some) with no benefit
Sajty 10:09 then maybe I'm looking the wrong location? I thought it should be here: https://github.com/firebreath/FireBreath/blob/master/src/NpapiCore/NpapiPluginModule_NPP.cpp#L338
ahh its passed to the plugin
but there is not handled too.
taxilian 10:09 !find NpapiPluginX11
FireBreathBot 10:09 Found 2 possible matches. Displaying 2
/^NpapiPluginX11::NpapiPluginX11(const FB::Npapi::NpapiBrowserHostPtr& host, const std::string& mimetype)$/ (f) found in src/PluginAuto/X11/NpapiPluginX11.cpp: http://goo.gl/tXml6
/^ class NpapiPluginX11 : public NpapiPlugin$/ (c) found in src/PluginAuto/X11/NpapiPluginX11.h: http://goo.gl/LGrQz
taxilian 10:09 https://github.com/firebreath/FireBreath/blob/master/src/PluginAuto/X11/NpapiPluginX11.cpp#L75
Sajty: it's right there
Sajty 10:09 ahh ok :D
sry, I'm blind.
maybe because my TFT monitor died and now I'm on 17" CRT :P
taxilian 10:09 lol
sabotaged|wk 18:09 when i try this plugin renaming trick on mac, using chrome: if on the old instance of the plugin i browse away, then install the new version as a different name, delete the old plugin, then open a new chrome tab to a page with the plugin.. it shows as no plugin available
even after i call navigator.plugins.refresh(true)
clicking the refresh button on chrome works though
anyone has ideas
safari and firefox work ok here