Generally it will be the one that you have just opened, as the web shield scans the page content and anything loaded by it very quickly. In most cases it would block the loading of the page if whatever it is is embedded in the page source code, so firefox being what it does highlight tabs where there is a problem loading. Or in the case of external sources you would still have the main page loaded, now with add-ons like NoScript and or RequestPolicy, you can see what the external links/scripts are in that page.
The act of having either of these add-ons is likely to block an external link/script from being run, so you shouldn't actually get an alert unless you are in the page and have allowed scripts/access for an external link.
I don't believe there is any easy way to link the alert back to the parent tab as there would have to be some form of logging to record the url of the initiating page and any alert. Given the number of elements being scanned (just look at the web shield stats), I believe it could be an unreasonable overhead, which may slow browsing.