Remove some no longer needed code.
Change-Id: I0878d4ae22679c5f78490f16e139300f4b28859e
diff --git a/user/src/com/google/gwt/core/CoreWithUserAgent.gwt.xml b/user/src/com/google/gwt/core/CoreWithUserAgent.gwt.xml
index 90efce2..48fa48e 100644
--- a/user/src/com/google/gwt/core/CoreWithUserAgent.gwt.xml
+++ b/user/src/com/google/gwt/core/CoreWithUserAgent.gwt.xml
@@ -31,16 +31,4 @@
<when-property-is name="compiler.useSourceMaps" value="true"/>
</replace-with>
- <!-- Utility class to query if source maps are enabled, mainly for testing -->
- <replace-with class="com.google.gwt.core.client.impl.SourceMapProperty.SourceMapEnabled">
- <when-type-is class="com.google.gwt.core.client.impl.SourceMapProperty.SourceMapImpl"/>
- <when-property-is name="compiler.useSourceMaps" value="true"/>
- </replace-with>
-
- <!-- If stack trace emulation is on, we can still get accurate stack traces even if sourcemaps are off -->
- <replace-with class="com.google.gwt.core.client.impl.SourceMapProperty.SourceMapEnabled">
- <when-type-is class="com.google.gwt.core.client.impl.SourceMapProperty.SourceMapImpl"/>
- <when-property-is name="compiler.useSourceMaps" value="false"/>
- <when-property-is name="compiler.stackMode" value="emulated"/>
- </replace-with>
</module>
diff --git a/user/src/com/google/gwt/core/client/impl/SourceMapProperty.java b/user/src/com/google/gwt/core/client/impl/SourceMapProperty.java
deleted file mode 100644
index 6e79367..0000000
--- a/user/src/com/google/gwt/core/client/impl/SourceMapProperty.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2011 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 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. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package com.google.gwt.core.client.impl;
-
-import com.google.gwt.core.client.GWT;
-
-/**
- * Helper class to query if SourceMaps are enabled and capable of working on the current user
- * agent.
- */
-public class SourceMapProperty {
-
- static class SourceMapEnabled extends SourceMapImpl {
-
- public native boolean doesBrowserSupportSourceMaps() /*-{
- // Chrome only for now, future Firefoxes have promised support
- return navigator.userAgent.indexOf('Chrome') > -1;
- }-*/;
-
- public boolean isSourceMapGenerationOn() {
- return true;
- }
- }
-
- static class SourceMapEmulated extends SourceMapEnabled {
-
- public boolean shouldUseSourceMaps() {
- // pretend emulated stack is a sourcemap
- return true;
- }
- }
-
- /**
- * Interface to provide both the compile time and runtime <code>user.agent</code> selection
- * property value.
- */
- static class SourceMapImpl {
-
- public boolean doesBrowserSupportSourceMaps() {
- return false;
- }
-
- public boolean isSourceMapGenerationOn() {
- return false;
- }
-
- public boolean shouldUseSourceMaps() {
- return isSourceMapGenerationOn() && doesBrowserSupportSourceMaps();
- }
- }
-
- private static final SourceMapImpl IMPL = GWT.create(SourceMapImpl.class);
-
- public static boolean doesBrowserSupportSourceMaps() {
- return IMPL.doesBrowserSupportSourceMaps();
- }
-
- /**
- * True if fully accurate stack traces are possible. True for DevMode, emulated stack traces, and
- * cases where sourceMaps can work with detailed browser stack trace support.
- */
- public static boolean isDetailedDeobfuscatedStackTraceSupported() {
- return !GWT.isScript() || shouldUseSourceMaps();
- }
-
- public static boolean isSourceMapGenerationOn() {
- return IMPL.isSourceMapGenerationOn();
- }
-
- public static boolean shouldUseSourceMaps() {
- return IMPL.shouldUseSourceMaps();
- }
-}
diff --git a/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java b/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java
index 652eaac..40b368f 100644
--- a/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java
+++ b/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java
@@ -17,7 +17,6 @@
package com.google.gwt.user.client.rpc;
import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.impl.SourceMapProperty;
import com.google.gwt.junit.client.GWTTestCase;
import java.util.logging.Level;
@@ -32,9 +31,9 @@
* WARNING! WARNING! If you edit this method or insert any lines of code above this method,you
* must re-edit the line number constants below;
*/
- private static final int METHOD_START_LINE = 39;
+ private static final int METHOD_START_LINE = 38;
- private static final int METHOD_EXCEPTION_LINE = 41;
+ private static final int METHOD_EXCEPTION_LINE = 40;
private void throwException(String arg) {
// prevent inlining by double referencing arg
@@ -163,7 +162,7 @@
for (StackTraceElement e : thrown.getStackTrace()) {
if (e.getFileName().contains("LoggingRPCTest")) {
// if DevMode or SourceMaps enabled and Chrome is the browser, check for exact line
- if (SourceMapProperty.isDetailedDeobfuscatedStackTraceSupported()) {
+ if (System.getProperty("user.agent", "safari").equals("safari")) {
assertEquals(METHOD_EXCEPTION_LINE, e.getLineNumber());
} else {
// else fallback to line number of method itself