[gwt-contrib] Change in gwt[master]: Changes StackTraceDeobfuscator to abstract and provide vario...
Brian Slesinsky has posted comments on this change. Change subject: Changes StackTraceDeobfuscator to abstract and provide various factory methods. .. Patch Set 2: (3 comments) File user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java Line 65: throw new MissingResourceException("Missing resource: " + filePath, null, filePath); Should be FileNotFoundException, to agree with the javadoc. Line 86: public static StackTraceDeobfuscator fromURL(final URL urlPath) { Google style would be "fromUrl" instead of "fromURL". In GWT it seems to be inconsistent - there is UrlBuilder and UrlUtils but there is also GWT.getModuleBaseURL. Line 89: return new URL(urlPath, fileName).openStream(); I don't know if this will throw FileNotFoundException if there is a 404 (or equivalent for other protocols). -- To view, visit https://gwt-review.googlesource.com/2270 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I562e052caef8da7f3434319cf11b8984bc347fe5 Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan Gerrit-Reviewer: Brian Slesinsky Gerrit-Reviewer: Goktug Gokdogan Gerrit-HasComments: Yes -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Changes StackTraceDeobfuscator to abstract and provide vario...
Goktug Gokdogan has uploaded a new patch set (#2). Change subject: Changes StackTraceDeobfuscator to abstract and provide various factory methods. .. Changes StackTraceDeobfuscator to abstract and provide various factory methods. This change will remove the need for extending StackTraceObfusctor most of the time as in almost all scenarios it is extended to get the symbol map from jar through the class loader (which makes sense). Also a factory is provided to get the symbol map from the file system. For all other cases, developers can construct the deobfuscator with a URL path or extend the class to override openInputStream method. Change-Id: I562e052caef8da7f3434319cf11b8984bc347fe5 Review-Link: https://gwt-review.googlesource.com/#/c/2270/ --- M user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java M user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java 2 files changed, 68 insertions(+), 50 deletions(-) -- To view, visit https://gwt-review.googlesource.com/2270 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I562e052caef8da7f3434319cf11b8984bc347fe5 Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan Gerrit-Reviewer: Brian Slesinsky Gerrit-Reviewer: Goktug Gokdogan -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Changes StackTraceDeobfuscator to abstract and provide vario...
Goktug Gokdogan has posted comments on this change. Change subject: Changes StackTraceDeobfuscator to abstract and provide various factory methods. .. Patch Set 1: (8 comments) File user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java Line 54:* {@link ClassLoader}. Done Line 59: return new StackTraceDeobfuscator() { I don't think this will be a real issue, as if somebody really needs to know which anonymous class it is, it will be easy to follow by the line number. Line 72:* Creates a deobfuscator that loads symbol map files from the given file path. Done. About parameter type: As in most google3 scenarios, directory name is usually available as string, so this is more convenient for developer. Line 83:* Creates a deobfuscator that loads symbol map files from the given url path. Done. (javadoc) URL doesn't mean HTTP protocol. A file or resource from a jar can all be identified via URL. All other fromXXX methods above could have written by calling this method instead of anonymous class (I am just doing a minor optimization by not using this). For example; JunitHost will be using this one to get the files from the servlet context.. Line 85: public static StackTraceDeobfuscator fromFileSystem(final URL urlPath) { Opps. Thanks for catching that. Line 98: private static class SymbolCache { I also like them at the end if they are private. Especially, in this case keeping the public static methods on the top helps with discoverability. Google java style guide is more helpful on this as it only asks for logical order. Anyway I am OK to change it if this is a strict rule or this class is going to be of the few exceptions.. Line 158:* Note that, this has no effect on permutations that the symbols have already been loaded for. Done. There are 3 logical states here; loaded / partially loaded / not loaded. Applied that to your suggestion. Line 338: protected abstract InputStream openInputStream(String fileName) throws IOException; Added more description on the javadoc. Currently this method is also called repeatedly which usually doesn't make sense if it is a "not found' error. I like none of that, however I have other priorities right now. We can defer it as the problem was always there. -- To view, visit https://gwt-review.googlesource.com/2270 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I562e052caef8da7f3434319cf11b8984bc347fe5 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan Gerrit-Reviewer: Brian Slesinsky Gerrit-Reviewer: Goktug Gokdogan Gerrit-HasComments: Yes -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Remove early optimization from Precompile.
Brian Slesinsky has posted comments on this change. Change subject: Remove early optimization from Precompile. .. Patch Set 2: Code-Review+1 It makes sense. It seems like the only way this could break something is if draftCompile was already broken? What do the numbers look like? -- To view, visit https://gwt-review.googlesource.com/2280 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I26bad5f14735a9283021b53edadc5bde1a659c45 Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Roberto Lublinerman Gerrit-Reviewer: Brian Slesinsky Gerrit-Reviewer: Ray Cromwell Gerrit-HasComments: No -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Remove early optimization from Precompile.
Roberto Lublinerman has uploaded a new patch set (#2). Change subject: Remove early optimization from Precompile. .. Remove early optimization from Precompile. An early round of optimization results in increased compile time for large projects. The reason is that the optimizations are run on a bigger AST that does not benefit of the prunning made available by instantiating a specific permutation. Change-Id: I26bad5f14735a9283021b53edadc5bde1a659c45 Review-Link: https://gwt-review.googlesource.com/#/c/2280/ --- M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java 1 file changed, 0 insertions(+), 8 deletions(-) -- To view, visit https://gwt-review.googlesource.com/2280 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I26bad5f14735a9283021b53edadc5bde1a659c45 Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Roberto Lublinerman Gerrit-Reviewer: Brian Slesinsky Gerrit-Reviewer: Ray Cromwell -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Remove early optimization from Precompile.
Roberto Lublinerman has uploaded a new change for review. https://gwt-review.googlesource.com/2280 Change subject: Remove early optimization from Precompile. .. Remove early optimization from Precompile. An early round of optimization results in increased compile time for large project. The reason is that the optimizations are run on a bigger AST that does not benefit of the prunning made available by instantiating a specific permutation. Change-Id: I26bad5f14735a9283021b53edadc5bde1a659c45 --- M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java 1 file changed, 0 insertions(+), 8 deletions(-) diff --git a/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java b/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java index 5d1a2ab..17104e4 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java +++ b/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java @@ -716,14 +716,6 @@ * reducing the total permutation count. */ optimize(options, jprogram); -} else { - /* - * Do only minimal early optimizations. This code path is used by the - * Precompile entry point. The external system might be able to - * perfectly parallelize the permutation compiles, so let's avoid - * doing potentially superlinear optimizations on the unified AST. - */ - optimizeLoop("Early Optimization", jprogram, false); } } -- To view, visit https://gwt-review.googlesource.com/2280 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26bad5f14735a9283021b53edadc5bde1a659c45 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Roberto Lublinerman -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Attempt to continue after the JDT compiler aborts.
Brian Slesinsky has uploaded a new change for review. https://gwt-review.googlesource.com/2271 Change subject: Attempt to continue after the JDT compiler aborts. .. Attempt to continue after the JDT compiler aborts. This could occasionally work, but in my test case it just causes a RuntimeException later due to violating an internal JDT invariant. Still, it lets us print the names of a few more source files of death before dying. Change-Id: Ia94d998c6b4e56d880570c726aa09f004a4f552c --- M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java index 05c038c..dfc37e0 100644 --- a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java +++ b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java @@ -226,11 +226,14 @@ } private class CompilerImpl extends Compiler { +private TreeLogger logger; +private int abortCount = 0; -public CompilerImpl() { +public CompilerImpl(TreeLogger logger) { super(new INameEnvironmentImpl(), DefaultErrorHandlingPolicies.proceedWithAllProblems(), getCompilerOptions(), new ICompilerRequestorImpl(), new DefaultProblemFactory( Locale.getDefault())); + this.logger = logger; } /** @@ -248,7 +251,19 @@ @Override public void process(CompilationUnitDeclaration cud, int i) { - super.process(cud, i); + try { +super.process(cud, i); + } catch (AbortCompilation e) { +abortCount++; +String filename = new String(cud.getFileName()); +logger.log(TreeLogger.Type.ERROR, +"JDT aborted: " + filename + ": " + e.problem.getMessage()); +return; // continue without it; it might be a server-side class. + } catch (RuntimeException e) { +logger.log(TreeLogger.Type.ERROR, +"JDT died after " + abortCount + " previous errors", e); +throw new AbortCompilation(cud.compilationResult, e); + } ClassFile[] classFiles = cud.compilationResult().getClassFiles(); Map results = new LinkedHashMapCompiledClass>(); for (ClassFile classFile : classFiles) { @@ -739,17 +754,19 @@ icus.add(new Adapter(builder)); } -compilerImpl = new CompilerImpl(); +compilerImpl = new CompilerImpl(logger); try { compilerImpl.compile(icus.toArray(new ICompilationUnit[icus.size()])); } catch (AbortCompilation e) { - if (e.problem.getOriginatingFileName() != null) { + if (e.problem == null) { +logger.log(TreeLogger.Type.ERROR, "JDT compiler aborted"); + } else if (e.problem.getOriginatingFileName() == null) { +logger.log(TreeLogger.Type.ERROR, "JDT compiler aborted: " + e.problem.getMessage()); + } else { String filename = new String(e.problem.getOriginatingFileName()); TreeLogger branch = logger.branch(TreeLogger.Type.ERROR, "At " + filename + ": " + e.problem.getSourceLineNumber()); branch.log(TreeLogger.Type.ERROR, "JDT compiler aborted: " + e.problem.getMessage()); - } else { -logger.log(TreeLogger.Type.ERROR, "JDT compiler aborted: " + e.problem.getMessage()); } throw new UnableToCompleteException(); } finally { -- To view, visit https://gwt-review.googlesource.com/2271 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia94d998c6b4e56d880570c726aa09f004a4f552c Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Brian Slesinsky -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Re: Change in gwt[master]: Updates ICU4J from 4.4.2 to 50.1.1
Thanks for your reply. Pull as in git-svn. My bad - synced trunk but not tools :/ On Tuesday, March 19, 2013 12:20:06 AM UTC+2, John A. Tamplin wrote: > > On Mon, Mar 18, 2013 at 5:30 PM, > wrote: > >> >> Any updates on this? Just did a pull and the jar is still missing. > > > When you say a pull, did you mean svn up? gwt/tools is still managed > under svn, and I picked it up just a couple of days ago when I synced. > > -- > John A. Tamplin -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Re: Change in gwt[master]: Updates ICU4J from 4.4.2 to 50.1.1
On Mon, Mar 18, 2013 at 5:30 PM, wrote: > > Any updates on this? Just did a pull and the jar is still missing. When you say a pull, did you mean svn up? gwt/tools is still managed under svn, and I picked it up just a couple of days ago when I synced. -- John A. Tamplin -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Changes StackTraceDeobfuscator to abstract and provide vario...
Brian Slesinsky has posted comments on this change. Change subject: Changes StackTraceDeobfuscator to abstract and provide various factory methods. .. Patch Set 1: (8 comments) File user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java Line 54:* {@link ClassLoader}. "that loads symbol map and source map files as resources under the given resource path. Uses StackTraceObfuscator's ClassLoader." Line 59: return new StackTraceDeobfuscator() { Stack traces will be easier to read if you convert these anonymous classes into nested classes, so it's clearer which one is in use. Line 72:* Creates a deobfuscator that loads symbol map files from the given file path. "loads symbol and source map files from the given directory". Maybe the argument should be a File? Line 83:* Creates a deobfuscator that loads symbol map files from the given url path. "loads symbol and source map files from a URL beneath the given parent." This seems rather dicy. We will end up doing two HTTP requests for each file (one for the symbol map and another for the source map). If the file doesn't exist, there's only one request, but still someone could use this API as a way to do a denial-of-service attack on whichever server we're loading the files from. Maybe leave out this constructor for now? Line 85: public static StackTraceDeobfuscator fromFileSystem(final URL urlPath) { "fromUrl(final URL parentDir)" Line 98: private static class SymbolCache { According to GWT's usual stye, nested classes go above static methods. However, I think it would be better to put the inner classes at the end. Line 158:* Note that, this has no effect on permutations that the symbols have already been loaded for. "This will only have an effect on symbol maps that haven't been loaded yet." Line 338: protected abstract InputStream openInputStream(String fileName) throws IOException; "This method will be called with a filename (not including a slash) for a symbol map or a source map file and the implementation should open the file in the appropriate directory, or throw an IOException if the file wasn't found. The returned InputStream doesn't need to be buffered." However, maybe we want to do a better job of logging unexpected errors? It seems like reporting a simple log message (not a full stack trace) for the first few missing files would make it easier to fix configuration errors, instead of dropping all IOExceptions silently like we do now. And if it's not just a missing file then I think it deserves a full stack trace. So perhaps we should have a specific exception for a normal file not found error, so we can catch it separately? -- To view, visit https://gwt-review.googlesource.com/2270 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I562e052caef8da7f3434319cf11b8984bc347fe5 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan Gerrit-Reviewer: Brian Slesinsky Gerrit-HasComments: Yes -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [gwt-contrib] dev tools
> Chrome already has a protocol for most of this stuff, a wire-debugging > protocol and source-maps. Yes, I know. My point was that FF/Chrome should use the same wire protocol. That way if GPE ever learns to control the browser/JS debugger (e.g. for SuperDevMode debugging while staying in Eclipse/GPE), it doesn't have to implement a different protocol for each browser. Perhaps it is on the Firefox team's shoulders to play nice and be compatible with the Chrome protocol; same thing with IE. My point is that a pro-active "let's share" initiative might be in order here, to save the IDE developers of the world a lot of hurt. Vs. the Selenium/WebDriver re-active approach of only standardizing on a protocol after 5-10 years of wasting the Selenium team's lives trying to trick each browser into doing what they want. - Stephen -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Re: Change in gwt[master]: Updates ICU4J from 4.4.2 to 50.1.1
Any updates on this? Just did a pull and the jar is still missing. On Wednesday, February 6, 2013 8:24:52 PM UTC+2, Brian Slesinsky wrote: > > Brian Slesinsky has abandoned this change. > > Change subject: Updates ICU4J from 4.4.2 to 50.1.1 > .. > > > Abandoned > > Submitted. > > -- > To view, visit https://gwt-review.googlesource.com/1700 > To unsubscribe, visit https://gwt-review.googlesource.com/settings > > Gerrit-MessageType: abandon > Gerrit-Change-Id: I75c9e0e07c4d29a75573701a676a19d6e83b91d9 > Gerrit-PatchSet: 3 > Gerrit-Project: gwt > Gerrit-Branch: master > Gerrit-Owner: John A. Tamplin > > Gerrit-Reviewer: Andrew Bachmann > > Gerrit-Reviewer: Brian Slesinsky > > Gerrit-Reviewer: John A. Tamplin > > -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [gwt-contrib] dev tools
Chrome already has a protocol for most of this stuff, a wire-debugging protocol and source-maps. IntelliJ/WebStorm have direct support for this. WebStorm 6 for example + Chrome will do much of what the Firefox announcement talks about. It even has "Live Editing" On Mon, Mar 18, 2013 at 10:36 AM, Stephen Haberman wrote: > Hey, > > I know I've been quiet on the GWT front lately, but I've really enjoyed > seeing all of the reviews/commits going by. Great stuff. > > You've probably seen it, but there's a Mozilla post about next-gen dev > tools: > > http://paulrouget.com/e/devtoolsnext > > I posted a comment on it, but given we have GWT/Googlers here on the > list, wanted to reiterate: it seems like if we ever want SuperDevMode > editing/debugging to be anywhere near as sexy/seamless as JvmDevMode > debugging, we'd want a simple *cross-browser* protocol for doing all of > the IDE-ish things like step in/out/reload CSS/etc. > > I don't think GWT has the man power, either in Google or out, to build > per-browser hacks into GPE to do all of this sexy stuff from scratch > (i.e. we're trying to get out of the per-browser/extension game). > > Googlers, or anyone else, any comments on whether Chrome devs are > thinking the same thing? I know Chrome has wire protocols, but > specifically on a standard debugging protocol... > > Seems like a lot of the new Chrome dev tool stuff I've seen lately is > about rebuilding an IDE inside of Chrome, which just seems so very > backwards from what GWT users would like to see. > > - Stephen > > -- > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > --- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit Contributors" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Changes StackTraceDeobfuscator to abstract and provide vario...
Goktug Gokdogan has uploaded a new change for review. https://gwt-review.googlesource.com/2270 Change subject: Changes StackTraceDeobfuscator to abstract and provide various factory methods. .. Changes StackTraceDeobfuscator to abstract and provide various factory methods. This change will remove the need for extending StackTraceObfusctor most of the time as in almost all scenarios it is extended to get the symbol map from jar through the class loader (which makes sense). Also a factory is provided to get the symbol map from the file system. For all other cases, developers can construct the deobfuscator with a URL path or extend the class to override openInputStream method. Change-Id: I562e052caef8da7f3434319cf11b8984bc347fe5 --- M user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java M user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java 2 files changed, 63 insertions(+), 50 deletions(-) diff --git a/user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java b/user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java index 44d209b..7c4f191 100644 --- a/user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java +++ b/user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java @@ -25,9 +25,11 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.net.URL; import java.util.HashMap; import java.util.HashSet; import java.util.Map; +import java.util.MissingResourceException; import java.util.Scanner; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; @@ -45,7 +47,48 @@ * directory is written. By default, the final symbolMaps directory is * war/WEB-INF/deploy/yourmodulename/symbolMaps/. */ -public class StackTraceDeobfuscator { +public abstract class StackTraceDeobfuscator { + + /** + * Creates a deobfuscator that loads symbol map files from the given resource path using + * {@link ClassLoader}. + */ + public static StackTraceDeobfuscator fromResource(String symbolMapsPath) { +final String basePath = symbolMapsPath.endsWith("/") ? symbolMapsPath : symbolMapsPath + "/"; +final ClassLoader classLoader = StackTraceDeobfuscator.class.getClassLoader(); +return new StackTraceDeobfuscator() { + protected InputStream openInputStream(String fileName) throws IOException { +String filePath = basePath + fileName; +InputStream inputStream = classLoader.getResourceAsStream(filePath); +if (inputStream == null) { + throw new MissingResourceException("Missing resource: " + filePath, null, filePath); +} +return inputStream; + } +}; + } + + /** + * Creates a deobfuscator that loads symbol map files from the given file path. + */ + public static StackTraceDeobfuscator fromFileSystem(final String symbolMapsDirectory) { +return new StackTraceDeobfuscator() { + protected InputStream openInputStream(String fileName) throws IOException { +return new FileInputStream(new File(symbolMapsDirectory, fileName)); + } +}; + } + + /** + * Creates a deobfuscator that loads symbol map files from the given url path. + */ + public static StackTraceDeobfuscator fromFileSystem(final URL urlPath) { +return new StackTraceDeobfuscator() { + protected InputStream openInputStream(String fileName) throws IOException { +return new URL(urlPath, fileName).openStream(); + } +}; + } /** * A cache that maps obfuscated symbols to arbitrary non-null string values. The cache can assume @@ -105,36 +148,16 @@ private static final int LINE_NUMBER_UNKNOWN = -1; private static final String SYMBOL_DATA_UNKNOWN = ""; - private final boolean lazyLoad; - private final File symbolMapsDirectory; private final Map sourceMaps = new HashMap(); private final SymbolCache symbolCache = new SymbolCache(); + private boolean lazyLoad = false; /** - * Creates a deobfuscator that loads symbol map files from the given directory. Symbol maps are - * generated into the location specified by the GWT compiler -deploy command line - * argument. - * - * @param symbolMapsDirectory the symbolMaps directory, with or without trailing - *directory separator character + * If set to {@code true}, only symbols requested to be deobfuscated are cached and the rest is + * discarded. This provides a large memory savings at the expense of occasional extra disk reads. + * Note that, this has no effect on permutations that the symbols have already been loaded for. */ - public StackTraceDeobfuscator(String symbolMapsDirectory) { -this(symbolMapsDirectory, false); - } - - /** - * Creates a deobfuscator that loads symbol map files from the given directory. Symbol maps are - * generated i
[gwt-contrib] Change in gwt[master]: fix mismatch in Double/Float.isInfinite between dev / produc...
Brian Slesinsky has posted comments on this change. Change subject: fix mismatch in Double/Float.isInfinite between dev / production .. Patch Set 1: Code-Review+1 -- To view, visit https://gwt-review.googlesource.com/2250 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e7a891ff1339a64f3d9aaa57978fac6b23fdb64 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Daniel Kurka Gerrit-Reviewer: Brian Slesinsky Gerrit-Reviewer: Matthew Dempsky Gerrit-Reviewer: Thomas Broyer Gerrit-HasComments: No -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Avoid running JsInliner on the full JavaScript tree.
Roberto Lublinerman has abandoned this change. Change subject: Avoid running JsInliner on the full JavaScript tree. .. Abandoned Submitted, thanks! -- To view, visit https://gwt-review.googlesource.com/1930 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iba3cedf4f001f216509f2c3d003ed7fe25725708 Gerrit-PatchSet: 9 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Roberto Lublinerman Gerrit-Reviewer: Brian Slesinsky Gerrit-Reviewer: John A. Tamplin Gerrit-Reviewer: Ray Cromwell Gerrit-Reviewer: Roberto Lublinerman Gerrit-Reviewer: Thomas Broyer -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] dev tools
Hey, I know I've been quiet on the GWT front lately, but I've really enjoyed seeing all of the reviews/commits going by. Great stuff. You've probably seen it, but there's a Mozilla post about next-gen dev tools: http://paulrouget.com/e/devtoolsnext I posted a comment on it, but given we have GWT/Googlers here on the list, wanted to reiterate: it seems like if we ever want SuperDevMode editing/debugging to be anywhere near as sexy/seamless as JvmDevMode debugging, we'd want a simple *cross-browser* protocol for doing all of the IDE-ish things like step in/out/reload CSS/etc. I don't think GWT has the man power, either in Google or out, to build per-browser hacks into GPE to do all of this sexy stuff from scratch (i.e. we're trying to get out of the per-browser/extension game). Googlers, or anyone else, any comments on whether Chrome devs are thinking the same thing? I know Chrome has wire protocols, but specifically on a standard debugging protocol... Seems like a lot of the new Chrome dev tool stuff I've seen lately is about rebuilding an IDE inside of Chrome, which just seems so very backwards from what GWT users would like to see. - Stephen -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: fix mismatch in Double/Float.isInfinite between dev / produc...
Matthew Dempsky has posted comments on this change. Change subject: fix mismatch in Double/Float.isInfinite between dev / production .. Patch Set 1: Code-Review+1 -- To view, visit https://gwt-review.googlesource.com/2250 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e7a891ff1339a64f3d9aaa57978fac6b23fdb64 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Daniel Kurka Gerrit-Reviewer: Matthew Dempsky Gerrit-Reviewer: Thomas Broyer Gerrit-HasComments: No -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Re: ie9 bug fixes. (issue1383809)
Marius: I agree with your comments, but this change has actually been merged already (despite not being closed here). Please file an issue and possibly provide a patch (preferably to Gerrit rather than Rietveld) As for the reasons of the method overrides, it probably has to do with this: http://stackoverflow.com/questions/2717252/document-body-scrolltop-is-always-0-in-ie-even-when-scrolling (though I haven't tested in IE9 how it actually behaves; keeping in mind that the DOMImplIE9 is only used for "IE9 in IE9 Standards mode", i.e. documentMode >= 9) http://gwt-code-reviews.appspot.com/1383809/ -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Re: gwt rebranding
> Ah ah, love that new acronym: GWT = Gorgeous Web Toolkit/box ;-) > (I prefer toolkit to toolbox, it rhymes with GWiT) > Ah right, as everyone likes rhymes "toolkit" should be preferred :) Just gives a better flow during a talk. -- J. -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.