Trap window.onerror by default.
Changes gwt.uncaughtexceptionhandler.windowonerror
to REPORT_IF_NO_HANDLER.
This is a good default for most GWT applications.
see: https://gwt-review.googlesource.com/c/gwt/+/18540
This re-rolls commit e1f1eb0a118d5413c78b93feaa2f3f7689a2b911
Change-Id: I4f2e9e923136356b48a306f36f4c05ff9c21fe92
diff --git a/user/src/com/google/gwt/core/Core.gwt.xml b/user/src/com/google/gwt/core/Core.gwt.xml
index 5fcc52b..5569fe4 100644
--- a/user/src/com/google/gwt/core/Core.gwt.xml
+++ b/user/src/com/google/gwt/core/Core.gwt.xml
@@ -92,7 +92,7 @@
- Do not trap anything (legacy behavior) (IGNORE)
-->
<define-property name="gwt.uncaughtexceptionhandler.windowonerror" values="IGNORE, REPORT, REPORT_IF_NO_HANDLER" />
- <set-property name="gwt.uncaughtexceptionhandler.windowonerror" value="IGNORE"/>
+ <set-property name="gwt.uncaughtexceptionhandler.windowonerror" value="REPORT_IF_NO_HANDLER"/>
<!-- To support legacy logging flags -->
<inherits name="com.google.gwt.logging.LogImpl"/>
diff --git a/user/test/com/google/gwt/core/WindowOnError.gwt.xml b/user/test/com/google/gwt/core/WindowOnError.gwt.xml
deleted file mode 100644
index 0f34c54..0000000
--- a/user/test/com/google/gwt/core/WindowOnError.gwt.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- -->
-<!-- Copyright 2017 Google Inc. -->
-<!-- Licensed under the Apache License, Version 2.0 (the "License"); you -->
-<!-- may not use this file except in compliance with the License. You may -->
-<!-- may obtain a copy of the License at -->
-<!-- -->
-<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
-<!-- -->
-<!-- Unless required by applicable law or agreed to in writing, software -->
-<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
-<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
-<!-- implied. License for the specific language governing permissions and -->
-<!-- limitations under the License. -->
-
-<module>
- <inherits name="com.google.gwt.core.Core" />
- <set-property name="gwt.uncaughtexceptionhander.windowonerror" value="REPORT_IF_NO_HANDLER"/>
-</module>
diff --git a/user/test/com/google/gwt/core/client/WindowOnErrorTest.java b/user/test/com/google/gwt/core/client/WindowOnErrorTest.java
index 6752b84..ea4e305 100644
--- a/user/test/com/google/gwt/core/client/WindowOnErrorTest.java
+++ b/user/test/com/google/gwt/core/client/WindowOnErrorTest.java
@@ -27,7 +27,7 @@
@Override
public String getModuleName() {
- return "com.google.gwt.core.WindowOnError";
+ return "com.google.gwt.core.Core";
}
@Override