Thomas Broyer has submitted this change and it was merged.

Change subject: Workaround JSONTest failure in Firefox 17
......................................................................


Workaround JSONTest failure in Firefox 17

For some reason, calling JSONValue.isNull() sometimes returns non-null
even for JSONArray, JSONBoolean, and JSONObject values.  This only
happens in Firefox 17 in web, draft, or nometa test modes, not in dev
mode.

As a workaround, since JSONNull is a singleton class, return null in
JSONNull.isNull() if 'this' doesn't refer to the singleton instance.

Bug: issue 8139
Change-Id: I8c79c5279a122748047b23d068e2eed4ad9fb22f
---
M user/src/com/google/gwt/json/client/JSONNull.java
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Leeroy Jenkins: Verified
  Thomas Broyer: Looks good to me, approved



diff --git a/user/src/com/google/gwt/json/client/JSONNull.java b/user/src/com/google/gwt/json/client/JSONNull.java
index 8da5c87..b3b1e61 100644
--- a/user/src/com/google/gwt/json/client/JSONNull.java
+++ b/user/src/com/google/gwt/json/client/JSONNull.java
@@ -49,6 +49,10 @@
    */
   @Override
   public JSONNull isNull() {
+ // Workaround for https://code.google.com/p/google-web-toolkit/issues/detail?id=8139
+    if (this != instance) {
+      return null;
+    }
     return this;
   }


--
To view, visit https://gwt-review.googlesource.com/2734
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c79c5279a122748047b23d068e2eed4ad9fb22f
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Matthew Dempsky <mdemp...@google.com>
Gerrit-Reviewer: Brian Slesinsky <skybr...@google.com>
Gerrit-Reviewer: Goktug Gokdogan <gok...@google.com>
Gerrit-Reviewer: John Stalcup <stal...@google.com>
Gerrit-Reviewer: Leeroy Jenkins <jenk...@gwtproject.org>
Gerrit-Reviewer: Matthew Dempsky <mdemp...@google.com>
Gerrit-Reviewer: Ray Cromwell <cromwell...@google.com>
Gerrit-Reviewer: Roberto Lublinerman <rlu...@google.com>
Gerrit-Reviewer: Thomas Broyer <t.bro...@gmail.com>

--
--
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.


Reply via email to