Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit b12e80d

Browse files
lukesandbergcopybara-github
authored andcommitted
Disable the Closure Debug Loader by default.
This is being done because pre-bundling code is always a superior strategy and when bundling the debug loader is not needed. Having the loader enabled may hide misconfigurations or log unactionable warnings. This will eventually make it possible to move the debug loader out of base.js and drop all the associate code from development scenarios. RELNOTES: Disable the Closure Debug Loader by default. PiperOrigin-RevId: 513384198 Change-Id: I85571d2781a96c89f1e39466d76ed353d19024c3
1 parent 75ee5d4 commit b12e80d

File tree

9 files changed

+28
-2
lines changed

9 files changed

+28
-2
lines changed

closure/goog/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ goog.addDependency = function(relPath, provides, requires, opt_loadFlags) {
786786
* provided (and depend on the fact that some outside tool correctly ordered
787787
* the script).
788788
*/
789-
goog.ENABLE_DEBUG_LOADER = goog.define('goog.ENABLE_DEBUG_LOADER', true);
789+
goog.ENABLE_DEBUG_LOADER = goog.define('goog.ENABLE_DEBUG_LOADER', false);
790790

791791

792792
/**

closure/goog/messaging/testdata/portchannel_inner.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
-->
99
<head>
1010
<title>PortChannel test inner document</title>
11+
<script>
12+
var CLOSURE_DEFINES = CLOSURE_DEFINES || {};
13+
CLOSURE_DEFINES["goog.ENABLE_DEBUG_LOADER"]=true;
14+
</script>
1115

1216
<!-- MOE:insert <script src="../../base.js"></script> -->
1317
<script>

closure/goog/messaging/testdata/portchannel_worker.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
self.CLOSURE_BASE_PATH =
1717
self.CLOSURE_BASE_PATH = '../../';
1818
importScripts('../../bootstrap/webworkers.js');
19+
self.CLOSURE_DEFINES = self.CLOSURE_DEFINES || {};
20+
self.CLOSURE_DEFINES['goog.ENABLE_DEBUG_LOADER'] = true;
1921
importScripts('../../base.js');
2022

2123
// The provide is necessary to stop the jscompiler from thinking this is an

closure/goog/messaging/testdata/portchannel_wrong_origin_inner.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
-->
99
<head>
1010
<title>PortChannel test inner document</title>
11-
<script src="../../base.js"></script>
11+
<script>
12+
var CLOSURE_DEFINES = CLOSURE_DEFINES || {};
13+
CLOSURE_DEFINES["goog.ENABLE_DEBUG_LOADER"]=true;
14+
</script>
15+
<script src="../../../../../javascript/closure/base.js"></script>
1216
<script>
1317
goog.require('goog.messaging.PortChannel');
1418
</script>

closure/goog/messaging/testdata/portnetwork_inner.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<title>
1111
Closure Unit Tests - goog.messaging.PortNetwork iframe page
1212
</title>
13+
<script>
14+
var CLOSURE_DEFINES = CLOSURE_DEFINES || {};
15+
CLOSURE_DEFINES["goog.ENABLE_DEBUG_LOADER"]=true;
16+
</script>
1317

1418
<!-- MOE:insert <script src="../../base.js"></script> -->
1519
<script>

closure/goog/messaging/testdata/portnetwork_worker1.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
self.CLOSURE_BASE_PATH =
1717
self.CLOSURE_BASE_PATH = '../../';
18+
self.CLOSURE_DEFINES = self.CLOSURE_DEFINES || {};
19+
self.CLOSURE_DEFINES['goog.ENABLE_DEBUG_LOADER'] = true;
1820
importScripts('../../bootstrap/webworkers.js');
1921
importScripts('../../base.js');
2022

closure/goog/messaging/testdata/portnetwork_worker2.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
self.CLOSURE_BASE_PATH =
1717
self.CLOSURE_BASE_PATH = '../../';
1818
importScripts('../../bootstrap/webworkers.js');
19+
self.CLOSURE_DEFINES = self.CLOSURE_DEFINES || {};
20+
self.CLOSURE_DEFINES['goog.ENABLE_DEBUG_LOADER'] = true;
1921
importScripts('../../base.js');
2022

2123
// The provide is necessary to stop the jscompiler from thinking this is an

closure/goog/net/crossdomainrpc_test_response.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
-->
1616
<title>crossdomainrpc test response</title>
1717
<body>
18+
<script>
19+
var CLOSURE_DEFINES = CLOSURE_DEFINES || {};
20+
CLOSURE_DEFINES["goog.ENABLE_DEBUG_LOADER"]=true;
21+
</script>
1822
<!-- MOE:begin_strip -->
1923
<script src="../../../../javascript/closure/base.js"></script>
2024
<!-- MOE:end_strip_and_replace

closure/goog/net/xpc/testdata/inner_peer.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
<head>
1818
<title>XPC test inner frame</title>
19+
<script>
20+
var CLOSURE_DEFINES = CLOSURE_DEFINES || {};
21+
CLOSURE_DEFINES["goog.ENABLE_DEBUG_LOADER"] = true;
22+
</script>
1923
<!-- MOE:begin_strip -->
2024
<script src="../../../../../../javascript/closure/base.js"></script>
2125
<!-- MOE:end_strip_and_replace

0 commit comments

Comments
 (0)