On Sat, Aug 15, 2009 at 6:54 AM, Erik Kay <[email protected]> wrote: > > I like the idea in general. As you say, it has some good properties. > For negatives, are there any situations where it > chrome.extension.lastError could become invalid during the lifetime of > the callback? Random possibilities: > > - You make another extension API call - shouldn't cause a problem > since the callback for the new call won't happen during the lifetime > of this callback > - You do something that can cause JS reentrancy (call out to a plugin, > call out to the DOM) - I don't think this could cause another callback > to be fired during this callstack, but perhaps if they run a nested > modal loop? > - You use one of our (few) synchronous API calls - perhaps these never > set lastError since they don't use callbacks? > - Could another RenderView in the same process get a callback while > another RenderView is blocked? - I don't think so since they all > execute on the same main thread, but again, perhaps there's some way > when you call out to a plugin that this can happen. > > Any others? I can't say for sure whether the ones I mentioned would > cause problems (my gut says no). Matt probably knows for sure.
As far as I can tell, the only one that is possible is that using a sync API might cause lastError to be set. Maybe we don't use lastError for sync APIs, but in that case we're inconsistent. Either way it's a bit of a negative. I'm not sure whether it's worse than the alternatives, though. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en -~----------~----~----~----~------~----~------~--~---
