IRC Log Viewer » #firebreath » 2012-06-12

IRC Nick Time (GMT-7) Message
danny__ 08:06 how do i convert FB::VariantMap to an std::string ?
taxilian 08:06 err
a variantmap is a string,variant map
a string is a string
I'm not sure I follow what you're trying to do; there is no inherent obvious conversion
can you be a bit more specific?
danny__ 08:06 yes
i am using the FB::SimpleStreamHelper::AsyncPost in the callback function there is this variable FB::VariantMap outHeaders;
i want to be able to pass the outHeaders to a JS event
taxilian 09:06 okay; and what is the problem?
danny__ 09:06 the event is defined as passing an std::string varibe
so there is type mismatch between std::string and FB::VariantMap
taxilian 09:06 first of all, if you're passing a list of headers why are you trying to pass it as a streing?
danny__ 09:06 my event needs to pass a string in some cases and when there is an error i'd like to send the headers to be able to see where the error occured
so question is how to get my event to send string and headers which are strings
taxilian 09:06 up to you, I suppose.
so all a variantmap is is a std::map<FB::variant>
do you know how to iterate through a std::map?
danny__ 09:06 not sure. can you help?
taxilian 09:06 .lmgt iterate through std::map
FireBreathBot 09:06 Let me google that for you:
taxilian 09:06 awesome. next question; when you iterate through, each item (iter->second) will be a FB::variant
do you know how to convert that to a string?
danny__ 09:06 convert_cast<std::string>() ?
taxilian 09:06 yep
sounds like you're there =]
and iter->first will already be a streing
grr. I hate this keyboard; if you type fast on it it actually starts adding characters that aren't there
I think I need a new one =]
danny__ 09:06 lol
ok. let me see if this works for me.
FireBreathBot 09:06 Commit 4c262f0 on master by Anders Bach Madsen: "Updated npapi files from"
Commit b37582b on master by Richard Bateman: "Merge pull request #64 from vmware/4c262f061fab5c551af3d3dd1..."
Commit 27bde25 on master by Anders Bach Madsen: "Removing the deprecated calls to _dyld_get_image_header_cont..."
Commit 353dcaf on master by Anders Bach Madsen: "Added missing newline at the end of files. This is to make t..."
Commit 49d260c on master by Anders Bach Madsen: "The bufsize was saved to an unsigned int variable and then t..."
rcompton78 09:06 Hello all, I am running into something strange with my plugin and am hoping someone can shed some light on something
I want to do a few cleanup things on plugin shutdown (StatidDeinit) and I am noticing that it does not always get through it all. Depending on how long things take, the function just stops with no exception at all. My first thought was that chrome main thread was shutting down thus killing all the children threads (plugins..etc). Is this possible?
taxilian 09:06 yes
chrome runs your plugin in a seperate process
if you take too long to shut down it'll just kill you
you have to remember that your plugin is a guest in someone else's process; if it doesn't like you, it will kill you
rcompton78 09:06 ahh thats what I thought. Any way you can think to get around this?? The problem is that I have some 3rd party DLL's loaded a few of them take windows a little while to unload.
just let it die?? It will get unloaded when chrome shuts down anyway but I would obviously prefer to do it myself
btw, if you remember last summer you worked for a few days with a Marwan Hilmi (Curvedental). I was the lead dev on the plugin project for curve (Richard Compton). I want to thank you for your help and firebreath.
taxilian 09:06 if Chrome kills your process then the DLLs will be unloaded at that point immediately anyway
cool; I wondered how that project went
still going strong?
rcompton78 09:06 ya I figured that
taxilian 09:06 the only way I know of to ensure that you aren't killed early is to launch your own process, but that gets dicy with IPC
rcompton78 09:06 yes its out of beta and gone commercial for our web based dental imaging software. You are a life saver :)
taxilian 09:06 awesome
rcompton78 09:06 ya I also started down that road and pulled out lol
I am ok with the defacto unloading. I will just fly through my other non dll tear down tasks
taxilian 09:06 another thing you could truy doing is to unload it earlier; you could use reference counting to unload when the last instance of the plugin closes
the disadvantage is you may be unloading and then loading again between pages in some cases
but it may give you more leeway there
rcompton78 09:06 Anyway thanks for your help before and now. Again a life saver. If you need anything from us (tester, review) let me know
taxilian 09:06 I appreciate that. If you find some spare time and want to go over some of the pull requests and try them out that would be a help =]
I have been swamped lately
rcompton78 09:06 ahh good idea. I will try that. One of the kodak DLL's we load takes forever to load and unload so I might try preload that one and leave it up and then do what you said with the others.
taxilian 09:06 git pull requests
FireBreathBot 09:06 6 open pull requests:
diorcety: Add Exe wrapper to msi and cab generation
medusade: Modified InvalidateWindow in the PluginWindowX11 class to se...
Geal: Add a CMake function to build a Chrome plugin
Geal: Add a CMake function to build a XPI package using XPISigner
Geal: DMG installer generation
wroberts: Unsolicited npp newstream
taxilian 09:06 I'm way behind =]
that's definitely a thought
rcompton78 09:06 UNderstandable. I don't know how you keep up lol. I will get a few devs here to have a look the odd time when we have a few days (hackathons and such). haha love the bot. I will use that to check some requests out :)
thanks for your time. If we get a pull code reviewed and tested, should I email you or come on here or s there a direct git method you would prefer?
taxilian 09:06 email works, here works
there are also a lot of bug reports in jira
so if you can repro and help find fixes there that'd also be helpful
suprisingly few (right now almost none) are willing to dig into the actual firebreath code
so bugs tend to pile up until I can get to them
things that directly affect me and my plugins tend to get done first for some reason =]
rcompton78 09:06 haha no idea why. How did that async upload project work out for you. You were working on some fancy uploader
for sure. It will be good for us to get into the FB underbelly
Anyway I am off. Thanks for your help. I have forwarded an email about giving back to FB during down times and hackathons at curve to the CTO. I will also try have a peak the odd time too. Thanks again for all your work
taxilian 10:06 eh, it went okay, but I think Facebook just decided there were too many things that could go wrong with a plugin
(they're right)
I'm on to more interesting things now
awesome. thanks
rcompton78 10:06 I can imagine. Plugins are needed but raises the complexity a few level to say the least. But IMO with there is a growing need for plugins today. Google Nacl is a good example of a company believing need to run native code in a browser. So you have done well. Best framework I researched.
take care
taxilian 10:06 off to the office; be back soon
EL45 17:06 Hey taxilian, I am unable to make it to the IRC logs. just shows me the homepage. Is that the same for you?
taxilian 17:06 I probably broke it. thanks for letting me know, I'll fix it
EL45 17:06 No problem. Thanks!