One-line fix to building with Precompile/CompilePerms/Link.
The code should be serializing an AST, not serializing
an output stream onto itself.
Review by scottb (TBR), jat
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7014 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java b/dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java
index 79deb6d..d0c521c7 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java
@@ -185,7 +185,7 @@
diskCache.transferToStream(serializedAstToken, stream);
} else if (initialAst != null) {
// Serialize into raw bytes.
- Util.writeObjectToStream(stream, stream);
+ Util.writeObjectToStream(stream, initialAst);
} else {
throw new IllegalStateException(
"No serialized AST was cached and AST was already consumed.");