Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(88)

Unified Diff: dev/core/src/com/google/gwt/dev/shell/JavaScriptHost.java

Issue 1620805: Fix this->window confusion in DevMode
Patch Set: Use instance Created 1 year, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteJsniMethods.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dev/core/src/com/google/gwt/dev/shell/JavaScriptHost.java
diff --git a/dev/core/src/com/google/gwt/dev/shell/JavaScriptHost.java b/dev/core/src/com/google/gwt/dev/shell/JavaScriptHost.java
index 17a1b5c33d474dd8cccd175b74dfe62db0886f7e..8f3ecadd91bd390dbccce85ebf0d575f74b88249 100644
--- a/dev/core/src/com/google/gwt/dev/shell/JavaScriptHost.java
+++ b/dev/core/src/com/google/gwt/dev/shell/JavaScriptHost.java
@@ -23,6 +23,19 @@ public class JavaScriptHost {
private static ShellJavaScriptHost sHost;
+ /**
+ * Throws {@code NullPointerException} if {@code o} is null.
+ *<p>
+ * Used by {@code RewriteJsniMethods} to ensure JSO instance methods
+ * are not called against null instances.
+ */
+ public static Object checkNotNull(Object o) {
+ if (o == null) {
+ throw new NullPointerException("JSO instance was null");
+ }
+ return o;
+ }
+
public static void exceptionCaught(Object exception) {
sHost.exceptionCaught(exception);
}
« no previous file with comments | « no previous file | dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteJsniMethods.java » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld revision f51cb906c4ad+