From f49cc6e2f16c77adaab6e580fefc01d83c8db018 Mon Sep 17 00:00:00 2001 From: Konstantin Raev Date: Tue, 5 Jul 2016 11:36:31 -0700 Subject: [PATCH] Reverted commit D3516741 Summary: Looks like spaces in function names can happen, but the lib we use for parsing stacktraces doesn't support that. As result, when error is thrown in global scope, new JSC puts "global code" as function name, our parser chokes on it and thinks "global code@http://...." is a file name and sends it to packager. The packager can't resolve that URL and fails the whole symbolication request. Longer term fix here: https://github.com/errwischt/stacktrace-parser/pull/5 Reviewed By: astreet Differential Revision: D3516741 fbshipit-source-id: 7f14b52a50a118dc95a3463aee842941e904e984 --- packager/react-packager/src/Server/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packager/react-packager/src/Server/index.js b/packager/react-packager/src/Server/index.js index dadc7379c..c7ab61bee 100644 --- a/packager/react-packager/src/Server/index.js +++ b/packager/react-packager/src/Server/index.js @@ -499,10 +499,8 @@ class Server { const sourceUrl = frame.file; // Skip `/debuggerWorker.js` which drives remote debugging because it // does not need to symbolication. - // Skip anything except http(s), because there is no support for that yet if (!urlIndexes.hasOwnProperty(sourceUrl) && - !sourceUrl.endsWith('/debuggerWorker.js') && - sourceUrl.startsWith('http')) { + !sourceUrl.endsWith('/debuggerWorker.js')) { urlIndexes[sourceUrl] = uniqueUrls.length; uniqueUrls.push(sourceUrl); }