WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
157162
Web Inspector: FormatterWorker fails to find "External/Esprima.js" in Production builds
https://bugs.webkit.org/show_bug.cgi?id=157162
Summary
Web Inspector: FormatterWorker fails to find "External/Esprima.js" in Product...
Joseph Pecoraro
Reported
2016-04-28 20:19:29 PDT
* SUMMARY FormatterWorker fails to find "External/Esprima.js" in Production builds. This affects Safari Technology Preview Release 3 and Nightlies. * STEPS TO REPRODUCE 1. Open Inspector on this page 2. Try to open any Script with minified contents => Infinite loading indicator * ERROR [Error] Failed to load resource: The requested URL was not found on this server. (esprima.js, line 0) URL in this case being: file:///Applications/Safari%20Technology%20Preview.app/Contents/Frameworks/WebInspectorUI.framework/Resources/External/Esprima/esprima.js Bad path: WebInspectorUI.framework/Resources/External/Esprima.js The actual path ends up be: WebInspectorUI.framework/Resources/Esprima.js * NOTES Source/WebInspectorUI/UserInterface/Workers/Formatter/FormatterWorker.js does:
> importScripts(...[ > "../../External/Esprima/esprima.js", > "FormatterUtilities.js", > "FormatterContentBuilder.js", > "ESTreeWalker.js", > "EsprimaFormatter.js", > ]);
So apparently our optimization pass doesn't keep the External directory.
Attachments
[PATCH] Proposed Fix
(4.62 KB, patch)
2016-04-28 21:09 PDT
,
Joseph Pecoraro
joepeck
: commit-queue-
Details
Formatted Diff
Diff
[PATCH] Proposed Fix
(4.68 KB, patch)
2016-04-28 21:16 PDT
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-04-28 20:22:45 PDT
<
rdar://problem/25996556
>
Joseph Pecoraro
Comment 2
2016-04-28 21:09:57 PDT
Created
attachment 277670
[details]
[PATCH] Proposed Fix
Joseph Pecoraro
Comment 3
2016-04-28 21:11:21 PDT
Here is an example of the script producing a warning and working correctly. It modifies the files in place, so you can test on the UserInterface directory. # Comment out the line that does the replace. shell> perl ./Scripts/fix-worker-imports-for-optimized-builds.pl --input-directory ./UserInterface/Workers ERROR: Workers/Formatter/FormatterWorker.js: Unhandled External importScript in Worker script on line 27: "../../External/Esprima/esprima.js", shell> echo $? 1 # Revert the script back to expected shell> perl ./Scripts/fix-worker-imports-for-optimized-builds.pl --input-directory ./UserInterface/Workers shell> echo $? 0 shell> git diff . diff --git a/Source/WebInspectorUI/UserInterface/Workers/Formatter/FormatterWorker.js b/Source/WebInspectorUI/UserInterface/Workers/Formatter/FormatterWorker.js index 4f9067b..5811361 100644 --- a/Source/WebInspectorUI/UserInterface/Workers/Formatter/FormatterWorker.js +++ b/Source/WebInspectorUI/UserInterface/Workers/Formatter/FormatterWorker.js @@ -24,7 +24,7 @@ */ importScripts(...[ - "../../External/Esprima/esprima.js", + "../../Esprima.js", "FormatterUtilities.js", "FormatterContentBuilder.js", "ESTreeWalker.js",
Joseph Pecoraro
Comment 4
2016-04-28 21:15:16 PDT
Comment on
attachment 277670
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=277670&action=review
> Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl:250 > + system(File::Spec->catfile($scriptsRoot, 'fix-worker-imports-for-optimized-builds.pl'), '--input-directory', $workersDir);
This should: and die "Reason"; so that `make` itself fails the build if fix-worker-imports returns with a bad exit code
Joseph Pecoraro
Comment 5
2016-04-28 21:16:58 PDT
Created
attachment 277671
[details]
[PATCH] Proposed Fix
Joseph Pecoraro
Comment 6
2016-04-28 21:19:18 PDT
With the "and die" the build will actually fail now if this script fails. PhaseScriptExecution Copy\ User\ Interface\ Resources /Build/WebInspectorUI.build/Release/WebInspectorUI.build/Script-1C60FF1214E6D9AF006CD77D.sh cd /Code/safari/OpenSource/Source/WebInspectorUI export ACTION=build export ALTERNATE_GROUP=staff .... /bin/sh -c /Build/WebInspectorUI.build/Release/WebInspectorUI.build/Script-1C60FF1214E6D9AF006CD77D.sh ERROR: Workers/Formatter/FormatterWorker.js: Unhandled External importScript in Worker script on line 27: "../../External/Esprima/esprima.js", Failed to update Worker imports for optimized builds. at /Code/safari/OpenSource/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl line 250. Command /bin/sh failed with exit code 1 That is important, otherwise these issues could go unnoticed!
WebKit Commit Bot
Comment 7
2016-04-28 22:23:17 PDT
Comment on
attachment 277671
[details]
[PATCH] Proposed Fix Clearing flags on attachment: 277671 Committed
r200229
: <
http://trac.webkit.org/changeset/200229
>
WebKit Commit Bot
Comment 8
2016-04-28 22:23:23 PDT
All reviewed patches have been landed. Closing bug.
Joseph Pecoraro
Comment 9
2016-04-29 19:14:54 PDT
***
Bug 157223
has been marked as a duplicate of this bug. ***
Timothy Hatcher
Comment 10
2016-05-04 16:04:37 PDT
***
Bug 157343
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug