The bigger issue is they are dependent on frameworks that are still evolving at very high rates. Rapid changes brings a lot of chaos into the equation, which is dangerous from an investment perspective, but that same chaos can lead to unexpectedly strong results as well.
If anything, the collapse of Microsoft would produce many smaller companies competing to satisfy the ubiquitous demand for Windows support.
Yes it's true that your products wont stop functioning in the short term, but a dead framework that's no longer supported and updated means you HAVE TO rewrite it using another framework. and we all know how costly rewrites are.
I find the 2 scenarios you listed to have much more in common than not. The main difference is the amount of time you have to react.
The difference is that if Microsoft of Oracle/Sun disappear, the framework does not.
There is another rather unhealthy (IMHO) trend in the market today for DRM to be applied to everything. That can mean that products consumers have paid good money for can effectively just be switched off arbitrarily, and that's why I don't personally buy things that are DRM'd in such a way.
Developing for mobile platforms can be similarly risky. For example, my startup has no current plans to build an iPhone app, even though our users might appreciate it. We simply don't trust that Apple will not just arbitrarily squish us and not even notice/care based on their track record to date, and we would rather invest our money in safe platforms like the web. Apple aren't going to stop shipping a browser that can view modern web sites, it would kill their products.
It's analogical to buying shares with borrowed money. You've increased the potential upside, but now the downside is that much more catastrophic.
Now, please pause for a moment and consider: it doesn't have to be Microsoft or Apple or Oracle. Some of the crazy valuations are putting much less robust companies within an order of magnitude. If one of them goes, it's going to be big news and stock prices right across hi-tech industry could race to the bottom scarily fast as we've seen before.
If you are, for example, Zynga, then the kind of disaster that could lead to catastrophic failure seems awfully difficult for you to anticipate or control. Likewise all kinds of new companies being built on Twitter and so on, keeping in mind that Twitter (as far as I know) doesn't actually make any money itself yet and could easily be displaced by the next new shiny thing tomorrow.
I'm not saying it's going to happen at all, never mind tomorrow, but there is definitely a house of cards building up here, and of such things, market bubbles are made.
So logically anyone who wants to ship a physical product should start by developing their own oil well and aluminium ore mine.
And indeed, if your business depends on airfreight you will also be strongly coupled to the destiny of that part of the industry. There's no need to develop your own oil well, but to have a vision about alternatives is a good thing in that case. Branson's Virgin sells records. And airtravel. And Mobiles. Would he have survived by betting exclusively on Sony MiniDisc ?