Merge pull request #2416 from fredj/newer-closure-library

Upgrade closure-library version
This commit is contained in:
Frédéric Junod
2014-08-08 07:37:49 +02:00
6 changed files with 8 additions and 25 deletions
+2 -3
View File
@@ -236,6 +236,7 @@ def examples_star_json(name, match):
], ],
"define": [ "define": [
"goog.dom.ASSUME_STANDARDS_MODE=true", "goog.dom.ASSUME_STANDARDS_MODE=true",
"goog.json.USE_NATIVE_JSON=true",
"goog.DEBUG=false" "goog.DEBUG=false"
], ],
"jscomp_error": [ "jscomp_error": [
@@ -254,6 +255,7 @@ def examples_star_json(name, match):
"duplicate", "duplicate",
"duplicateMessage", "duplicateMessage",
"es3", "es3",
"es5Strict",
"externsValidation", "externsValidation",
"fileoverviewTags", "fileoverviewTags",
"globalThis", "globalThis",
@@ -276,9 +278,6 @@ def examples_star_json(name, match):
"extra_annotation_name": [ "extra_annotation_name": [
"api", "observable" "api", "observable"
], ],
"jscomp_off": [
"es5Strict"
],
"compilation_level": "ADVANCED", "compilation_level": "ADVANCED",
"output_wrapper": "// OpenLayers 3. See http://ol3.js.org/\n(function(){%output%})();", "output_wrapper": "// OpenLayers 3. See http://ol3.js.org/\n(function(){%output%})();",
"use_types_for_optimization": True, "use_types_for_optimization": True,
+2 -3
View File
@@ -18,6 +18,7 @@
], ],
"define": [ "define": [
"goog.dom.ASSUME_STANDARDS_MODE=true", "goog.dom.ASSUME_STANDARDS_MODE=true",
"goog.json.USE_NATIVE_JSON=true",
"goog.DEBUG=false" "goog.DEBUG=false"
], ],
"jscomp_error": [ "jscomp_error": [
@@ -33,6 +34,7 @@
"deprecated", "deprecated",
"duplicateMessage", "duplicateMessage",
"es3", "es3",
"es5Strict",
"externsValidation", "externsValidation",
"fileoverviewTags", "fileoverviewTags",
"globalThis", "globalThis",
@@ -58,9 +60,6 @@
"extra_annotation_name": [ "extra_annotation_name": [
"api", "observable" "api", "observable"
], ],
"jscomp_off": [
"es5Strict"
],
"compilation_level": "ADVANCED", "compilation_level": "ADVANCED",
"output_wrapper": "// OpenLayers 3. See http://ol3.js.org/\n(function(){%output%})();", "output_wrapper": "// OpenLayers 3. See http://ol3.js.org/\n(function(){%output%})();",
"use_types_for_optimization": true, "use_types_for_optimization": true,
+2 -3
View File
@@ -14,6 +14,7 @@
], ],
"define": [ "define": [
"goog.dom.ASSUME_STANDARDS_MODE=true", "goog.dom.ASSUME_STANDARDS_MODE=true",
"goog.json.USE_NATIVE_JSON=true",
"goog.DEBUG=false" "goog.DEBUG=false"
], ],
"jscomp_error": [ "jscomp_error": [
@@ -29,6 +30,7 @@
"deprecated", "deprecated",
"duplicateMessage", "duplicateMessage",
"es3", "es3",
"es5Strict",
"externsValidation", "externsValidation",
"fileoverviewTags", "fileoverviewTags",
"globalThis", "globalThis",
@@ -54,9 +56,6 @@
"extra_annotation_name": [ "extra_annotation_name": [
"api", "observable" "api", "observable"
], ],
"jscomp_off": [
"es5Strict"
],
"compilation_level": "ADVANCED", "compilation_level": "ADVANCED",
"output_wrapper": "(function(){%output%})();", "output_wrapper": "(function(){%output%})();",
"use_types_for_optimization": true, "use_types_for_optimization": true,
+1 -1
View File
@@ -1,3 +1,3 @@
{ {
"library_url": "https://github.com/google/closure-library/archive/ab89cf45c216615d73a2f5dea720afb9d3415d1f.zip" "library_url": "https://github.com/google/closure-library/archive/946a7d39d4ffe08676c755b21d901e71d9904a3b.zip"
} }
-8
View File
@@ -89,14 +89,6 @@ ol.BrowserFeature.HAS_DOM = ol.ENABLE_DOM;
ol.BrowserFeature.HAS_GEOLOCATION = 'geolocation' in goog.global.navigator; ol.BrowserFeature.HAS_GEOLOCATION = 'geolocation' in goog.global.navigator;
/**
* @const
* @type {boolean}
*/
ol.BrowserFeature.HAS_JSON_PARSE =
'JSON' in goog.global && 'parse' in goog.global.JSON;
/** /**
* True if browser supports touch events. * True if browser supports touch events.
* @const * @const
+1 -7
View File
@@ -2,7 +2,6 @@ goog.provide('ol.format.JSONFeature');
goog.require('goog.asserts'); goog.require('goog.asserts');
goog.require('goog.json'); goog.require('goog.json');
goog.require('ol.BrowserFeature');
goog.require('ol.format.Feature'); goog.require('ol.format.Feature');
goog.require('ol.format.FormatType'); goog.require('ol.format.FormatType');
@@ -32,12 +31,7 @@ ol.format.JSONFeature.prototype.getObject_ = function(source) {
if (goog.isObject(source)) { if (goog.isObject(source)) {
return source; return source;
} else if (goog.isString(source)) { } else if (goog.isString(source)) {
var object; var object = goog.json.parse(source);
if (ol.BrowserFeature.HAS_JSON_PARSE) {
object = /** @type {Object} */ (JSON.parse(source));
} else {
object = goog.json.parse(source);
}
return goog.isDef(object) ? object : null; return goog.isDef(object) ? object : null;
} else { } else {
goog.asserts.fail(); goog.asserts.fail();