Skip to content

Commit

Permalink
Remove extra assignment to gwtOnLoad
Browse files Browse the repository at this point in the history
Only saves about 10 bytes per GWT application, but the extra assignment
appears to serve no purpose.

Fixes gwtproject#10060
  • Loading branch information
niloc132 committed Dec 15, 2024
1 parent c2229e7 commit d0bcc81
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1962,10 +1962,10 @@ private void markPosition(String name, Type type) {
* source loading and runs in the global scope (not inside of any function scope).
*/
private void setupGwtOnLoad() {
/**
/*
* <pre>
* var $entry = Impl.registerEntry();
* var gwtOnLoad = ModuleUtils.gwtOnLoad();
* var $entry = ModuleUtils.registerEntry();
* var gwtOnLoad = ModuleUtils.gwtOnLoad;
* ModuleUtils.addInitFunctions(init1, init2,...)
* </pre>
*/
Expand All @@ -1980,8 +1980,8 @@ private void setupGwtOnLoad() {
// var gwtOnLoad = ModuleUtils.gwtOnLoad;
JsName gwtOnLoad = topScope.findExistingUnobfuscatableName("gwtOnLoad");
JsVar varGwtOnLoad = new JsVar(sourceInfo, gwtOnLoad);
varGwtOnLoad.setInitExpr(createAssignment(gwtOnLoad.makeRef(sourceInfo),
getIndexedMethodJsName(RuntimeConstants.MODULE_UTILS_GWT_ON_LOAD).makeRef(sourceInfo)));
varGwtOnLoad.setInitExpr(
getIndexedMethodJsName(RuntimeConstants.MODULE_UTILS_GWT_ON_LOAD).makeRef(sourceInfo));
getGlobalStatements().add(new JsVars(sourceInfo, varGwtOnLoad));

// ModuleUtils.addInitFunctions(init1, init2,...)
Expand Down

0 comments on commit d0bcc81

Please sign in to comment.