JS_GetLinePC is in SpiderMonkey and Mozilla releases SpiderMonkey standalone releases on a somewhat slow release schedule. I think the integration pain would make this not worth it.

However, while I was writing this, I did hit some issues with indexing mismatches (e.g., SpiderMonkey uses 1-indexing as opposed to 0-indexing for line numbers) so maybe the issues that we were having were caused by that we can drop most of this code?