5 Commits

Author SHA1 Message Date
Dave Borowitz
8cdc76ba4c Add @license tags to PG HTML and JS assets
These tags are preserved by the Closure compiler and vulcanize in order
to serve the license notices embedded in the outputs. In a standalone
Gerrit server, these license are also covered in the LICENSES.txt served
with the documentation. When serving PG assets from a CDN, it's less
obvious what the corresponding LICENSES.txt file is, since the CDN is
not directly linked to a running Gerrit server. Safer to embed the
licenses in the assets themselves.

Change-Id: Id1add1451fad1baa7916882a6bda02c326ccc988
2018-03-26 10:47:55 -04:00
Thomas Shafer
1848817498 Fix issue where HLJS was not configured when preloaded
Change-Id: Ie8c3d2aaae16ae4361f46372a5ed24ead24fe82e
2017-10-02 02:39:49 -07:00
Thomas Shafer
c72b9a9baa Gracefully handle lack of HLJS
Throw an exception when gr-app.html cannot be used to locate the
JS path root. Handle the case where HLJS is independently loaded.

Change-Id: Idd669907abff0bfc213ed8531a75380b1ad1d34a
2017-09-30 07:47:26 -07:00
Kasper Nilsson
2fe299253f ES6ify /gr-syntax-lib-loader/*
Bug: Issue 6179
Change-Id: I4a30e67a161af3ac7b6f857dbcb4cde89ec63578
2017-05-16 16:23:43 -07:00
Wyatt Allen
e7a51875e6 Address race condition in HLJS loader
Tapping the "Show Diffs" link in the change view to display all of a
change's diffs inline spawns several asynchronous syntax highlighting
processes. Sometimes (especially for long file lists and slower HLJS
download rates) multiple highlight processes would request HLJS before
it had been loaded, resulting in multiple load/definitions of the
library. Occasionally this would result in a JS exception.

With this change, the HLJS loader functionality of GR-SYNTAX-LAYER is
separated into the GR-SYNTAX-LIB-LOADER component. This component
employs a singleton property to track state across multiple lib requests
behind a promise interface.

Tests are updated.

Change-Id: I673998d406a33afa158e04c4dbb91fe31442d527
2016-09-12 16:00:23 -07:00