IRC Log Viewer » #firebreath » 2015-02-12

IRC Nick Time (GMT-7) Message
fetox 07:02 hi
I have to develop a browser plugin (should run on either chrome or firefox, preferably firefox) for a proprietary image format of my company and wondering if firebreath is the right framework?
the desired behavior would be that images we've got in a git repository maintained on stash are identified as renderable images and can be displayed in browser without modifying stash's html output
taxilian 08:02 fetox plugins cannot render automatically in place of img tags
if that's what you're asking
fetox 08:02 well.. I think it is no image tag
taxilian 08:02 you might try asking a specific question, then
if I have to guess what you actually want to do I may be here all day =]
fetox 08:02 stash can show all kinds of files, from like a directory strcuture, I guess it's only file links
taxilian 08:02 so there are two possibilities here: 1) stash is displaying it in a page, in which case there would be some sort of tag
2) stash is opening it raw, in which case the fact that it's stash has nothing to do with anything
2) stash is opening it raw, in which case the fact that it's stash has nothing to do with anything
so take stash out of the equation and figure out what you actually need tod do
so take stash out of the equation and figure out what you actually need tod do
fetox 08:02 ok, as I'm not superfit with web mechanisms: if I set up a webserver and just throw some files in it, I can access them under a URL and if its an image my browser would show it, if anything it can't handle it will let me download it, right?
taxilian 08:02 correct. a plugin can theoretically provide a solution for that... however, keep in mind that Chrome is dropping support for plugins in April. They've already turned it off in the dev channel
correct. a plugin can theoretically provide a solution for that... however, keep in mind that Chrome is dropping support for plugins in April. They've already turned it off in the dev channel
fetox 08:02 yep, I read that :/
yep, I read that :/
seems like firefox will drop it aswell
taxilian 08:02 they haven't announced any plans to drop support so far
so difficult to say
fetox 08:02 well.. i read somewhere that it is at least considered harmful.. but yeah, if for the moment I could develop a solution it would be nice
well.. i read somewhere that it is at least considered harmful.. but yeah, if for the moment I could develop a solution it would be nice
taxilian 08:02 it's possible, but not easy. FireBreath can help, but you may end up needing to add some functionality
it's possible, but not easy. FireBreath can help, but you may end up needing to add some functionality
which means you'd need to understand what is actually going on
which means you'd need to understand what is actually going on
based on this conversation so far I'd say your learning curve is steep enough that you're not likely to finish it by April. I don't mean that in a harsh way, but plugins are much more complicated than you might think
also depends on whether or not you need ActiveX support
also depends on whether or not you need ActiveX support
NPAPI is a bit easier
NPAPI is a bit easier
but doesn't work in IE
but doesn't work in IE
fetox 08:02 nope, NPAPI is sufficent.. and well, I know I have to read into some topics as I have not much experience in web technology, but I'm a programmer for like 25y now
I started like 2h ago, got an own project compiled using fbgen.py
taxilian 08:02 okay. just keep in mind that NPAPI is a beast =] my posts on colonelpanic.net may help; I think there is basic support in FireBreath for what you're trying to do, but I've never used it
fetox 08:02 ok, bookmarked :)
the ab
taxilian 08:02 look at the npapi posts specifically
and good luck =]
fetox 08:02 absurd thing is that actually theres not so much to actually for such a plugin, take the raw data, decode it and render it to some canvas.. interesting that such an easy task seems to be complicated :)
taxilian 08:02 the hard part is actually the "take the data" part
fetox 08:02 I mean.. I wrote a codec for it to display it in windows, a gimp plugin.. but a stupid browser is hard, erm :)
taxilian 08:02 also making sure there is a valid mimetype for the file in question
oh, I'm sure you could do it easy... with javascript. problem is you want to add functionality to the browser
oh, I'm sure you could do it easy... with javascript. problem is you want to add functionality to the browser
fetox 08:02 at least I got one registered in the windows registry
at least I got one registered in the windows registry
taxilian 08:02 that's not the issue
that's the easy part
fetox 08:02 already hooked to my empty firebreath project..
taxilian 08:02 the web server needs to be picking a mimetype
the web server needs to be picking a mimetype
the web server needs to be picking a mimetype
fetox 08:02 yep, thats the problem I guess
taxilian 08:02 and you indicated that you are using stash and don't necessarily have control of that
and you indicated that you are using stash and don't necessarily have control of that
fetox 08:02 was hoping by linking the extension aswell in the registry it would work
was hoping by linking the extension aswell in the registry it would work
taxilian 08:02 you *might* be able to do it with file extension, but I'm not sure
you *might* be able to do it with file extension, but I'm not sure
the tricky part is going to be the stream; there is a method in there somewhere for a browser-initiated stream
the tricky part is going to be the stream; there is a method in there somewhere for a browser-initiated stream
and that's what you'll need
and that's what you'll need
it'll give you the data for the file
but first make sure you can even get the plugin to load automatically
fetox 08:02 yep.. same as in the windows codec.. well.. basically the same :)
ok, I will investigate further, ty for the first insightful ideas already :)
taxilian 08:02 good luck
.. and I'll go back to trying to figure out the best way to build an NPAPI implementation of the Promise pattern... *sigh*
FireBreath2 will be entirely async so we can support a lot of new technologies post-chrome's npapi changes
beau 09:02 hey guys. Using Firebreath 1.7. After a recent update of IE10 and IE11, I am getting a crash in the Firebreath code. Have you guys seen this yet?
Crash is happening in firebreath/src/ActiveXCore/JSAPI_IDispatchEx.h in GetDispID. The first line of the function makes a wstring from the passed in bstrName. But I am seeing bstrName coming in as NULL.
taxilian 10:02 that is a bit weird
I haven't seen that happen, no
beau 10:02 yeah, in my testing, I have a BHO which uses IDispatch to call functions from my Firebreath plugin. Each time I do a GetIDsOfNames in the BHO, this function in Firebreath gets called once with a NULL bstrName, and then again with the real name.
taxilian 10:02 if you're not using it as a plugin then I'm not surprised if there are some oddities
beau 10:02 Well, I am using it as a plugin. I just also have a BHO (which doesnt use FB), that talks to my FB plugin.
taxilian 10:02 interesting
beau 10:02 It should be the same code path as if your were calling functions through javascript.
taxilian 10:02 interesting
beau 10:02 Worked fine for a year, until I applied an IE update this morning.
taxilian 10:02 nothing that "should" be is guaranteed in the world of IE
it might be that those are calling the default mehtod
could be you just need to add a handler so that a NULL dispid becomes ""
beau 10:02 I made a change in that FB function to just return if bstrName is NULL. works fine now.
but i figure you guys will want to look into it.
taxilian 10:02 ... yeah, I'd want to know *why* it's calling with NULL
as I said, it could just be "", in which case you really don't want to just ignore it
as I said, it could just be "", in which case you really don't want to just ignore it
it's a valid call
it's a valid call
beau 10:02 yeah, i dont either. If it was called with "", it wouldnt crash. Just when called with NULL. I looked around and couldnt find anything saying that its ok or not ok to call that with a NULL name.
Oh, are you saying that a call with NULL might actually be a call to ""?
Oh, are you saying that a call with NULL might actually be a call to ""?
taxilian 10:02 that's what I'm wondering
that's what I'm wondering
beau 10:02 I understand. Well, in my case, I dont support "" either so it shouldnt matter. As far as the real FB code goes though, that would be nice to know.
taxilian 10:02 actually you might
and not realize it
most methods in FireBreath are currently returned as objects
you can then call them as a function
which is translated as a call to ""
beau 10:02 i guess thats true. so you would recommend changing a NULL bstrName to ""?
taxilian 10:02 I would recommend attempting to figure out if that is what is happening
but it seems more reasonable than expecting that it is just arbitrarily sending extra calls =]
beau 10:02 yeah, running it in the debugger shows it one to one. I call the GetIDsOfNames in the BHO with 1 string. In the plugin I get 1 call with null, and a second call with the name.
taxilian 10:02 the first call might well be getting the name of the function for the property, then requesting the property and getting the object, then requesting the NULL to call the default
beau 10:02 maybe its a bug in your implementation of GetIDsOfNames that is calling it once too many times
maybe its a bug in your implementation of GetIDsOfNames that is calling it once too many times
taxilian 10:02 so that would make sense
no, there are actually two calls happening
beau 10:02 Ill run it through the debugger real quick and see
dang. i have to do a full rebuild. it will be a while
dang. i have to do a full rebuild. it will be a while
The GetIDsOfNames function is so simple though. Cant see how that would be suddenly broken
taxilian 10:02 my bet is that it isn't
just IE is calling us a bit differently for some reason
beau 10:02 If I remember correctly when i was tracking it down the first time, your GetIDsOfNames was not in the callstack
yeah, just tried it.
taxilian 10:02 there are two different entrypoints which can be called, remember
there are two different entrypoints which can be called, remember
one from IDispatchEx
beau 10:02 its not there. we are getting called directly from mshtml.dll
its not there. we are getting called directly from mshtml.dll
every time it gets called with a bad pointer, the grfdex param is 1. When it gets called with the good param, it is 8
taxilian 10:02 interesting
I could be wrong in my theory of course
just make sure that if you ignore it your method is still getting called correctly!
beau 10:02 yeah, if i just return DISP_E_UNKNOWNNAME if I see null, everything works fine.
taxilian 10:02 fair 'nuff, then
feel free to submit a pull request on that one
beau 10:02 but, im kinda leaning your way now of just setting it to ""
but, im kinda leaning your way now of just setting it to ""
taxilian 10:02 I'm working on FireBreath 2 right now, so probably won't get to it myself
setting it to "" is not at all the same thing and could cause something to be called that shouldn't be
beau 10:02 Any new features in FB2? Chrome??
ok. ill leave what I have. thanks.
taxilian 10:02 it will be a fair bit different
it will be a fair bit different
all calls to or from the browser will be asynchronous
beau 10:02 Have you come up with something to do about Chrome yet?
taxilian 10:02 by doing that we should be able to make it support Chorme Native Messaging
and potentially native client as well
as well as mozilla js-ctypes
as well as mozilla js-ctypes
beau 10:02 wow. Whats your timeline for that?
wow. Whats your timeline for that?
taxilian 10:02 basic implementation before April. it's my #1 priority right now
would help if I had some help, but nobody seems to care enough to help so far =]
would help if I had some help, but nobody seems to care enough to help so far =]
except kylehuff
except kylehuff
beau 10:02 well good luck. Well I care. Dont know what I can do to help though.
taxilian 10:02 hanging around to bounce ideas off of would actually be a huge help
and I could probably find other things you could help with from time to time if you're willing
you seem to understand activex; after I finish the changes to npapi, if you could spearhead the activex changes (patterned after the npapi ones) that would be a *huge* help
beau 10:02 I doubt I would be much help hanging around in the chat. I would be happy to open up an email channel
taxilian 10:02 do you use any other form of chat? skype? gtalk?
beau 10:02 I am on google hangouts chat
taxilian 10:02 the nice thing about discussing things in here is that everything is logged so I can go back and find it if I need to
I'm [email protected] on hangouts
beau 10:02 yeah, i understand. but if it doesnt make a noise, Ill likely never see it.
Ill try to send you a note now
Ill try to send you a note now
taxilian 10:02 if you use a normal IRC client you should get noise if your nick is mentioned
if you use a normal IRC client you should get noise if your nick is mentioned
beau do you see any notification?
beau 10:02 on a linux machine with no speakers
I sent you a hangouts reqeust. says your not on though
taxilian 10:02 hmm. I'm logged in
there we go, got the request
beau 10:02 cool. at the very least, if you wanted to pull me into a chat on here, YOu can reach me
taxilian 10:02 sounds great. would you possibly be willing to spend some time on activex stuff when I get there?
beau 10:02 Maybe. Im pretty loaded with stuff, but I will do what I can to help.
taxilian 10:02 fair enough
actually, one thing you could help me with right away if you're willing
can you see if you can find a way that I can evaluate javascript and get the result back as an IDispatch object?
can you see if you can find a way that I can evaluate javascript and get the result back as an IDispatch object?
I think there may be one in one of the newer APIs; It doesn't need to support anything older than IE8 and I'm willing to consider dropping support for that too if we need to
beau 11:02 stand by on that... i might already be doing it
so you are saying, in the plugin, craft an arbitrary js string, and send it to the browser to execute?
taxilian 11:02 yes. I can already do that, but what I can't do is get the result back
yes. I can already do that, but what I can't do is get the result back
beau 11:02 yeah, thats what I was going to say. I dont know how you would know what part of the arbitrary js string is the "result"
taxilian 11:02 when you evaluate an arbitrary string there is a result
just like if you evaluate a long single line in the js console
in NPAPI we can get that result, in IE we can't
one option would be to call window.eval
would be nice if there was a better way
would be nice if there was a better way
another possibility might be to have it generate some unique string, create a global function with that string's name, and execute the code inside the function. Then we add a requirement that the arbitrary string needs to be run as though in a function, so contains a "return ..." statement that will control the return value
beau 11:02 yeah, i dont think I can help on that one. My experience with FB is a pretty unique use case.
taxilian 11:02 was just hoping you might be willing to dig through the MS docs for me a bit =]
guess I'll have to find time to do it
guess I'll have to find time to do it
beau 11:02 I will take a gander if I get a chance.
I will take a gander if I get a chance.
taxilian 11:02 actually, I have another question
so you've done a lot of BHO stuff then?
beau 11:02 yes
taxilian 11:02 does a BHO work in full screen windows RT mode?
does a BHO work in full screen windows RT mode?
on windows 8
beau 11:02 No, win8 metro IE does not load BHO's or plugins
taxilian 11:02 are there any kind of extensions (toolbars, etc) that it does load?
beau 11:02 Not that I know of. At least none coded as DLLs. Pretty sure no JS style extensions either
taxilian 11:02 huh. I was thinking that toolbars at least worked
huh. I was thinking that toolbars at least worked
beau 11:02 Last I checked, i was pretty sure the answer was NO