3 ms·
In the context of a browser plugin, "quit" could just mean to stop executing and throw up an error message. It doesn't necessarily mean to end the whole process
by dbenamy 17y ago
In the context of a browser plugin, "quit" could just mean to stop executing and throw up an error message. It doesn't necessarily mean to end the whole process (browser).
- tedunangst 17y agoThrowing up an error message is likely to require allocating some of the memory you just ran out of. There's very little you can reasonably expect to do when you run out of memory. The caller needs to carefully back out, but this isn't something a wrapper can do by itself.
- Dove 17y agoSeems the best solution is to just throw an exception . . . . . . er, crap. This is C, isn't it?
- jacquesm 17y agoC can throw exceptions. the call is 'raise'.
- mfukar 17y agoStrings are still statically allocated (courtesy of C compilers everywhere), right? and I guess if you have to make one function call to throw an error message, there's some room left in the stack.. and then there's the whole virtual memory thing.. but I could be reasonably wrong. :-)