IRC Log Viewer » #firebreath » 2012-10-29

IRC Nick Time (GMT-7) Message
Ruud 07:10 Hi, i'm new to Firebug and Plugin-Development. I would appreciate some help about the following problem: I want to build a plugin for a certain mime-type and when a file is loaded in the browser i want access to the file content. Is Firebug a good choice for this?
Sorry, Firebreath not Firebug ;-)
reichi 07:10 if i understood you correctly, yes
but I'm not sure i understand what you mean with "when a file is loaded in the browser"
cause browser actually do load lot's of files ;)
+s
Ruud 08:10 for example if you open a word-file or a pdf
can i get easily to the content of the file?
and if yes, how?
reichi 08:10 well
your plugin will need to handle the opening etc
I'm not the one to help you with the "how" I've never done things like that with firebreath
sorry :/
Ruud 08:10 ok, and you don't know of any example plugin with that kind of stream handling?
reichi 08:10 oh wait
now i get it
that's easyily possible
youre talking about something like
<object type="application/pdf" data="http://mydomain/funny.pdf"></object>
righT?
Ruud 08:10 yes
reichi 08:10 that works fine
especially with the current master
taxillian recently improved the support for streams a lot
Ruud 08:10 any hint how to start?
reichi 08:10 not witht he new stuff
sorry
taxillian should be around in an hour or two
Ruud 08:10 ok, thanks
taxilian 09:10 Ruud: this is a much better place to ask me questions
Ruud 09:10 ok, sorry
taxilian 09:10 so what you are trying to do is called an unsolicited stream
a stream that the browser creates
it's only supported in the latest version of FireBreath
and I think there are a couple of bugs that I haven't had time to work through yet
Ruud 09:10 ok
i tried to override handleUnsolicitedStream, but i was not called by the browser...
taxilian 09:10 hmm. that's odd. there is a jira issue with a sample project in it, I believe
you could look at that
Ruud 09:10 yes i saw that
and i think there was the same problem
http://jira.firebreath.org/browse/FIREBREATH-203
taxilian 09:10 could be related, but it doesn't look like the same issue
so right now my normal dev environment isn't set up; I'll see what I can do and try to track this down in the next day or two
I've been putting it off too long
Ruud 09:10 ok, i would appreciate that
thanks
RenJuan 11:10 did you conceive FB, taxilian? If so presume it was in '09?
taxilian 11:10 yes, I created it
RenJuan 11:10 you built that, huh?
taxilian 11:10 Georg helped me with a lot of things; JSAPI is his
but about 90% of it I wrote
assuming by FB you mean FireBreath and not something else =]
RenJuan 11:10 well facebook is the other thing it could commonly be and obviously that's long since become a corporate deal
taxilian 11:10 hehe. I did actually work for them for about a year, though; they sponsored a fairly decent amount of FireBreath development
RenJuan 11:10 they pay like google I take it?
iirc google gives people one day a week to work on their own stuff
taxilian 11:10 no, I was hired as a contractor to work on a plugin for them
RenJuan 11:10 sh
taxilian 11:10 using FireBreath
RenJuan 11:10 ah
confirms they used contractors, actually they're prolly pretty distinct from google I would guess
but staff wages should be about the same
taxilian 11:10 I couldn't say; mine was a kinda unique situation. I wasn't available full time at that point
and I worked remotely
RenJuan 11:10 funny how people are kinda clueless about connecting the dots between google/facebook when they were the project of 1 or 2 doers and the latter day entities
*google/facebook, anything
RenJuan 12:10 was the unsolicited streams things ever verified to work?
taxilian 12:10 no
not completely
that's why I need to fix it
tpaul 12:10 Is there any info or examples on how to for fire an event on the JSAPIAuto class from a different class? I have seen an example of someone passing a shared_ptr of the JSAPIAuto to a class and calling JSAPIAutoPointer->fire_someevent(), as a test I tried this and it crashes, the comments for createJSAPI seem to discourage using a shared_ptr anyways.
RenJuan 12:10 don't be discouraged
taxilian 12:10 tpaul: that's basically how you do it
if it crashed, you probably didn't have a valid pointer
RenJuan 12:10 speaking of crash, I'm debugging the IE leg of my plugin and can't understand why the destruction of an apparently stub/unused AX CFB at birth of process is trapping
tpaul 12:10 hmm, I wonder what I have done wrong then, thanks for the help.
RenJuan 12:10 have FF 32 and 64 essentially done, so moving onto to issues beyond core function like IE, Chrome, and Opera
and side-by-side 32/64
tpaul 12:10 As a test, I am trying to use the 'shared_ptr' instead of 'this' in my MyPluginAPI, The failed assertion I get before it crashes is: "px != 0"
taxilian 12:10 right
tpaul 12:10 I'm certain I an doing something fundamentally wrong while either setting or using the shared_ptr, if someone could point me in the right direction I'd be grateful: http://pastebin.com/dXqUibpU
taxilian 12:10 that's because the shared_ptr you are using is a NULL ptr
tpaul 12:10 This is a dumb questions, but what can cause the pointer to be null?
taxilian 12:10 okay; first of all, you're confusing your terminology
you're calling a pluginAPI pointer pluginptr
that's going to confuse you quickly
secondly, you're assigning sharedPluginPointer->m_sharedPluginPointer to this->m_sharedPluginPointer… but where is this->m_sharedPluginPointer set?
don't see it set anywhere
tpaul 12:10 in createJSAPI()
taxilian 12:10 no, actually, if you read it you'll see that you don't ever set that
tpaul 12:10 I also tried passing it into the constructor
taxilian 12:10 third, if you're just calling it from your plugin class you can call getRootJSAPI() to get the FB::JSAPIPtr for your API and then you can just cast it to the type you need
i.e. FB::ptr_cast<MyPluginAPI>(getRootJSAPI())->fire_someevent()
on line 18 of the code you pasted you assign the new API ptr to sharedPluginPointer in the local scope
this->m_sharedPluginPointer is never initialized
so it's null
thus your code doesn't work
tpaul 13:10 Thank you taxilian, on line 22, which I think might have been a typo(I've tried a couple different things since) I'm going to try your suggestions
taxilian 13:10 tpaul: it is definitely a typo; either a typo of a fundamental misunderstanding of how C++ works =]
headed to get lunch
bbl
tpaul 13:10 I think the compiler would have complained about it if I had actually set that
tpaul 13:10 well it seems a typo was indeed my issue, I really appreciate the help
Fozi 14:10 Hey guys, is there support planned to use signing on windows not with .psx and password files but with a sha1 hash? That is use /sha1 instead of /f and /p.
taxilian 14:10 sure isn't
but you're welcome to add it yourself
Fozi 14:10 where would I push that back?
taxilian 14:10 github
pull request
Fozi 14:10 OIC I found the page. I'll look into it. Thx!
taxilian 14:10 dir
grr. wrong window :-P
RenJuan 14:10 that seems to be related to the gpg or whatever plugin Fozi, you might wanna look at that
Fozi 14:10 calling signtool with the right parameters is not hard but I don't think my cmake-fu is up to writing out the macro that does the proper checks
also, signtool can't check for the existance of a certificate, but certtool can
sorry, sertutil
certutil
taxilian 14:10 do a search for the macro used for signing currently
it's really not hard
Fozi 14:10 I did, I'm looking at the code (and changing it)
the problem is it looks like I need to call certutil to find out wether this is a developer machine or not.
I'll look into this some more...
taxilian 14:10 if you have specific questions let me know
RenJuan 14:10 i meant gpgAuth
Fozi 15:10 cmake question: what would be a good way to execute certutil and grep the output and then do a cmake if() on it if found?
e.g. certutil -store | find "d5 59 etc."
taxilian 15:10 at runtime or build time?
rather at build time or when you run cmake? (prep script)
if it just needs to run when you run the prep script, just use execute_process
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:execute_process
Fozi 15:10 prep script
taxilian 15:10 okay
so execute_process
use OUTPUT_VARIABLE to capture the output
Fozi 15:10 thx
taxilian 15:10 use string w/ regex to parse it
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:string
Fozi 15:10 if(${stuff} MATHES ${otherstuff}) does not seem to work well with multiple lines. Do I have to do something special?
or alternatively, how can I get the pipe to work? did not have much luck there, cmake tries to be smart and escapes the pipe ( | find ... )
thebill 15:10 Hi guys, I've built my plugin to get an image from a webcam/scanner and am getting some bytes from it. Need to send the image as a base64 encoded string, need some help with c++ images for the plugin
can anyone help?
anyone?
Fozi 16:10 ok, @taxilian, done. Do you mind if I just send you the codez instead of doing the github dance?
taxilian 16:10 Fozi: you can attach it to a jira ticket if you want, but it will take me much, much longer to get it in
thebill: nots ure I understand your question
Fozi 16:10 I was more thinking about giving you a link here.
taxilian 16:10 if you put it here I'll lose it
I've already spent more time on FB today than I had; I need to focus on my day job again =]
Fozi 16:10 ok, done. http://jira.firebreath.org/browse/FIREBREATH-207
G2G, should be back to RL ;)
taxilian 16:10 I had no idea you could even sign something using a hash like that
Fozi 16:10 Yeah, certificate must be in the store. Is more secure since you can't export it.
taxilian 16:10 ahh
Fozi 16:10 oh I think I forgot 2 messages in. line 8 and 11.
sorry 9 and 11
taxilian 16:10 no worries; I can handle removing excess logging