Disable optimization when loading r.js, as it has a method that is too
large when compiled as bytecode.
Showing
1 changed file
with
7 additions
and
1 deletions
... | @@ -97,7 +97,13 @@ public class Require { | ... | @@ -97,7 +97,13 @@ public class Require { |
97 | if (configPath != null && configPath.length() > 0) { | 97 | if (configPath != null && configPath.length() > 0) { |
98 | container.processSource(cx, this, configPath); | 98 | container.processSource(cx, this, configPath); |
99 | } | 99 | } |
100 | cx.evaluateReader(this, new FileReader(rLocation.getPath()), "r.js", 1, null); | 100 | int optLevel = cx.getOptimizationLevel(); |
101 | try { | ||
102 | cx.setOptimizationLevel(-1); | ||
103 | cx.evaluateReader(this, new FileReader(rLocation.getPath()), "r.js", 1, null); | ||
104 | } finally { | ||
105 | cx.setOptimizationLevel(optLevel); | ||
106 | } | ||
101 | return (Function) cx.evaluateString(this, "require", null, -1, null); | 107 | return (Function) cx.evaluateString(this, "require", null, -1, null); |
102 | } | 108 | } |
103 | 109 | ... | ... |
-
Please register or sign in to post a comment